Search documentation...

K

Segment

Sync rich customer data from your data warehouse to hundreds of SaaS tools via Segment's large integration library

Setup

To find the write key for your Segment destination in Hightouch:

  1. Create a new HTTP API source in Segment
  2. Navigate to Source Settings > API Keys and copy the Write Key

Syncing

Event types

  • Track (Generic): Sends events of different names when a record is added, changed, or removed in the query results
  • Track (Segment Entered / Exited): Sends the event "Segment Entered" when a record is added and "Segment Existed" when a record is removed
  • Identify: Sends an identify event with related properties of the user
To ensure syncs send each event, use a hash function for the event model's primary key . The hash should combine all columns, including member ID, timestamp, etc. See the event sync documentation for more information.

User and anonymous IDs

it's required to send either the user or anonymous ID to Segment to identify the user associated with the event.

Field mapping

You can sync columns from your source into properties of the user (identify) or properties of the event (track).

Sending initial results (track only)

For the two "Track" event types, Hightouch allows you to choose whether to:

  • Send the initial set of results as track events (as Entered / Added events)
  • Or, only send the changes between the results in the subsequent syncs as track events

Checking the "Send events for initial result set" checkbox will result in a large amount of events being sent in the first sync.

Hightouch will always send the initial set of results as identify calls when in the "Identify" event type.

Event names and timestamps (generic track only)

For the generic track mode, there are further settings that are needed to determine which event name Hightouch will send to Segment for each added, changed, and removed record.

In this example, Hightouch will send Segment:

  • A user signed up event when a record is added to the query results
  • A user changed subscription event when a record is changed in the query results
  • A user deleted account event when a record is removed in the query results

Hightouch allows you to send a timestamp that the event occurred for generic track events. This is useful for backfilling historical events.

Hightouch also allows you to send a message ID for each record to ensure that the event is deduplicated within Segment in the case that the same event erroneously gets sent twice.

Ready to get started?

Jump right in or a book a demo. Your first destination is always free.

Book a demoSign upBook a demo

Need help?

Our team is relentlessly focused on your success. Don't hesitate to reach out!

Feature requests?

We'd love to hear your suggestions for integrations and other features.

On this page

SetupSyncingEvent typesUser and anonymous IDsField mappingSending initial results (track only)Event names and timestamps (generic track only)

Was this page helpful?