Set up Segment
Enrich feedback with customer data from your CDP. The Segment integration supports bidirectional sync: receive user attributes from Segment identify events, and push segment membership changes back to Segment for use in downstream tools.
What you get
| Direction | Description |
|---|---|
| Inbound | Receive Segment identify events to sync user attributes (plan, company, role, etc.) into Quackback |
| Outbound | Push segment membership changes back to Segment as user traits |
Prerequisites
- A Segment workspace with a configured source
- A Segment write key (for outbound sync)
Set up inbound sync
Inbound sync receives identify events from Segment and writes user attributes to matching Quackback users.
Step 1: Create a destination in Segment
[Segment]
- Go to Connections > Destinations
- Add a Webhook destination (or use a Source Function)
- Set the webhook URL to:
https://YOUR_DOMAIN/api/integrations/segment/webhook
Step 2: Configure the shared secret
[Dashboard]
- Go to Admin → Settings → Integrations → Segment
- Enter a Shared Secret - this must match the signing secret configured in Segment
- Save
Quackback verifies inbound webhooks using HMAC-SHA1 signatures. The x-signature header on each request is validated against your shared secret.
Without a shared secret, Quackback cannot verify that incoming webhooks are from Segment. Always configure one in production.
How it works
When Segment sends an identify event:
- Quackback verifies the HMAC-SHA1 signature
- Extracts the user's email from
traits.emailorcontext.traits.email - Matches the email to an existing Quackback user
- Merges all traits as user attributes
Non-identify events (track, page, etc.) are ignored and return 200 OK.
Set up outbound sync
Outbound sync pushes segment membership changes from Quackback back to Segment as user traits.
Step 1: Get your Segment write key
[Segment]
- Go to Connections > Sources
- Select or create a source for Quackback data
- Copy the Write Key
Step 2: Configure outbound sync
[Dashboard]
- Go to Admin → Settings → Integrations → Segment
- Enter the Write Key
- Enable Outbound Sync
- Save
How it works
When a user's segment membership changes in Quackback (e.g. they join or leave a dynamic segment), Quackback sends an identify call to Segment's HTTP Tracking API with a boolean trait indicating membership.
For example, if a user joins the "Enterprise" segment, Segment receives:
{
"type": "identify",
"userId": "user@example.com",
"traits": {
"enterprise": true
}
}Segment names are converted to snake_case trait keys. Use these traits in Segment to trigger downstream workflows in tools like Braze, Iterable, or Customer.io.
Troubleshooting
Inbound events not syncing
- Verify the shared secret matches between Segment and Quackback
- Check that Segment is sending
identifyevents (not justtrack) - Ensure the user's email in Segment traits matches an existing Quackback user
Outbound sync not working
- Verify the write key is correct
- Check that Outbound Sync is toggled on
- Confirm the Segment source is active and receiving data
"401 Unauthorized" on webhook
The HMAC-SHA1 signature didn't match. Verify your shared secret is identical in both Segment and Quackback.
Next steps
- Segments - Create user segments in Quackback
- Integrations Overview - See all available integrations