Set up Segment

Sync user attributes from Segment identify events into Quackback, and push Quackback segment membership back to Segment as user traits.

JM
James Morton
Written By James MortonLast updated 1 day ago

Enrich feedback with customer data from your customer data platform. The Segment integration syncs in both directions: receive user attributes from Segment identify events, and push segment membership changes back to Segment for use in downstream tools.

Note: On Quackback Cloud, integrations are available on the Business and Enterprise plans. Self-hosted installs include every integration.

What you get

Direction

Description

Inbound

Receive Segment identify events to sync user attributes (plan, company, role, and so on) into Quackback

Outbound

Push segment membership changes back to Segment as user traits

Prerequisites

  • The Owner or Admin role in Quackback (or a custom role that can manage integrations)
  • 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

In Segment:

  1. Go to Connections > Destinations
  2. Add a Webhook destination (or use a Source Function)
  3. Set the webhook URL to:
https://YOUR_DOMAIN/api/integrations/segment/webhook

Replace YOUR_DOMAIN with your Quackback workspace domain.

Step 2: Configure the shared secret

In Quackback:

  1. Go to Admin > Settings > Integrations > Segment
  2. Enter a Shared Secret. It must match the signing secret configured in Segment
  3. Save

Quackback verifies inbound webhooks using HMAC-SHA1 signatures. The x-signature header on each request is validated against your shared secret.

Warning: Without a shared secret, Quackback cannot verify that incoming webhooks are from Segment. Always configure one in production.

How inbound sync works

When Segment sends an identify event:

  1. Quackback verifies the HMAC-SHA1 signature
  2. Extracts the user's email from traits.email or context.traits.email
  3. Matches the email to an existing Quackback user
  4. Merges all traits as user attributes

Non-identify events (track, page, and so on) 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

In Segment:

  1. Go to Connections > Sources
  2. Select or create a source for Quackback data
  3. Copy the Write Key

Step 2: Configure outbound sync

In Quackback:

  1. Go to Admin > Settings > Integrations > Segment
  2. Enter the Write Key
  3. Enable Outbound Sync
  4. Save

How outbound sync works

When a user's segment membership changes in Quackback (for example, 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": "[email protected]",
  "traits": {
    "enterprise": true
  }
}

Segment names are converted to snake_case trait keys. Use these traits in Segment to trigger downstream workflows in your other tools.

Troubleshooting

Inbound events not syncing

  1. Verify the shared secret matches between Segment and Quackback
  2. Check that Segment is sending identify events (not just track)
  3. Ensure the user's email in Segment traits matches an existing Quackback user

Outbound sync not working

  1. Verify the write key is correct
  2. Check that Outbound Sync is toggled on
  3. Confirm the Segment source is active and receiving data

"401 Unauthorized" on the webhook

The HMAC-SHA1 signature didn't match. Verify your shared secret is identical in both Segment and Quackback.

Was this helpful?

Your feedback shapes what we write next.