Segment Destination

Segment is a customer data platform (CDP) that enables you to collect, transform, send, and archive your first-party customer data. Segment simplifies the process of collecting data and hooking up new tools, allowing you to spend more time using your data, and less time trying to collect it.

The Sailthru Segment Destination allows organizations using Segment to easily pass crucial marketing data points from your Segment account into Sailthru user profiles with just a few clicks.

Out-of-the-box features include:

  • 1:1 profiles for identified Segment users
  • Pageviews, Sessions, and Interest Gathering
  • Automation entry points from any Segment event
  • Specialty automation triggers for Abandoned Cart & Abandoned Browse
  • Purchase-driven automation, segmentation, and personalization


Best Practice: Connecting your Sailthru account with a third party vendor requires a 3rd party API Key and Secret. For your account security, you should use a different Key and Secret for each integration. Contact support to request an integration-specific Key and Secret.

To install the Sailthru Segment destination, visit this link which will take you to the integration’s listing in the Segment marketplace.

Once installed, you can set up your API Key, Secret, and whether you’d like to track pageviews automatically to Sailthru from Segment. 

Note: Ask Sailthru support to enable your account for EXTID support. This will be used to store Segment userId values on Sailthru profiles.

User Profiles

When you call Segment’s identify() function, Sailthru will automatically create or update a profile for any user with a valid user ID.

analytics.identify("assigned-userId", {
 "name": "Stephen Noel",
 "email": "",
 "plan": "premium",
 "logins": 5

Email and User ID will be automatically mapped to Sailthru profile keys, with all other identify properties appearing in user profile custom fields.

Adding to Lists

To add users to lists, you can create a Subscribed Segment event with a list property. This will add the user to the natural list and mark the user as opted in

analytics.track("Subscribed", {
 "list": "Master List"

Alternatively, use Lifecycle Optimizer to create your own signup flow from any Segment event.

Purchases & Carts

Sailthru will automatically process Segment Order Completed, Product Added, and Product Removed events as Sailthru purchases and abandoned cart updates. This will allow you to use Lifecycle Optimizer’s Purchase Made and Cart Abandonment entries automatically (note: Cart Abandonment does require pageview data to be enabled in Segment destination settings or Sailthru’s Onsite javascript).

Required Fields

  • For eCommerce data, Sailthru requires a url property for each line item.
  • cart_id is required for Product Added and Product Removed events.

If email is not supplied in your Segment Order Completed event, we will make our best effort to correlate preexisting Sailthru profile data. In the unlikely event no email can be found after multiple correlation attempts, the purchase event will be marked with an error in Segment. This will allow you to replay the event once the user’s email has been established.

Field Mapping

On the order level, we’ll capture tax, shipping, and discount automatically as adjustments. To make sure all orders enter Sailthru exactly once, the integration will use order_id, checkout_id, or Segment’s message_id as a unique key for the order. 

For line items, URL, title, quantity, price, and tags will all map to Sailthru’s content fields, with all other fields appearing as item custom fields. If the item is not already in your Sailthru Content Library, it will automatically be created from the purchase details.

All non-standard Sailthru fields will be available in order-level and item-level custom fields, all accessible in Audience Builder and Lifecycle Optimizer entries.

Note: In order to properly pass date and time information to Sailthru as a timestamp, the following naming and formatting conventions must be used:

  • Dates
    • Value: For dates, such as birthdays, store a string in the date format: YYYY-MM-DD (for example, 2013-12-15). If the year is unknown, set it to 0000 (for example, 0000-12-15).
    • Var name: _date is required at the end of the var name in order for values to be interpreted as dates. (For example, birth_date or first_login_date.)
  • Times
    • Values: For time, such as the moment a user signed up, store in UNIX timestamp format (i.e. the number of seconds since Jan 1, 1970 00:00:00 GMT). For example, 1388087892.
    • Var names: _time is required at the end of the var name in order for values to be interpreted as timestamps. (For example, last_discount_time or signup_time.)

Sailthru Campaign Attribution

The Sailthru Segment Integration can automatically attribute purchases to your Sailthru campaigns and LO flows by adding a new query parameter st_bid to your clickthroughs. These can be automatically enabled in MY at

Track Pageviews, Sessions, and Interest Data

The Sailthru Destination for Segment consumes all Segment pageviews. By default, pageview tracking relies on interest tags in your Content Library but those can be overridden by passing a tags array in your Segment page() request properties. 

The Sailthru Destination for Segment can also automatically generate connected onsite sessions from your Segment pageview stream, allowing you to use Lifecycle Optimizer’s Browse Abandoned and Cart Abandoned entries.

If for any reason you wish to not track Segment pageviews in Sailthru, you can disable this via a toggle in your Segment Destination settings.

Start Lifecycle Optimizer Flows from Segment Events

All other events recorded with Segment’s track() API are able to kick off Lifecycle Optimizer flows via the Custom Event (API) entry. Any data passed in a Segment event’s properties will be available for entry filters, checks, and accessible in-template.