Setting up a Segment Integration

The Segment Integration allows you to standardize and sync your survey data with your databases, marketing and SaaS tools to enrich, personalize and re-market. 

With this integration, you can send labeled question responses to Segment which can then be passed to any of the different systems that Segment integrates with.

Please note: The Segment integration is limited to one integration per survey. The Segment integration is an Enterprise level feature.

To set up a Segment integration, follow the steps below:

1. Navigate to your survey's integration Home Page.

2. Click + Add on the Segment integration.

3. Select your tracking method

  • Identify lets you tie a user to their actions and record traits about them. Data will be sent as a trait.
  • Track records any actions your users perform, along with any properties that describe the action. Data will be sent as an event, with additional information sent as properties.

4. Add your Write Key.

5. Toggle on the actions you want to act as triggers to send data to Segment

6. Label the question pages or subjects and answers that you want sent to Segment using the Key and Values as defined in Segment. 

 

7. Optionally, set context fields that will be sent within the Segment context object. Context fields can be single-level or multi-level.

8. Important! If you are sending your survey to previously identified Segment users, please provide their ID to the Segmanta survey by using the URL query parameter seg_erid. You could also pass an anonymous user id using the ajs_aid param (which is not recommended by Segment).  If neither param is passed into the Segmanta survey, Segment will consider the user anonymous and assign them with a new ID. Learn more about identifying your respondents (note that in Segmanta seg_erid is to be used over ajs_uid).

9. Custom ExternalIDs. Segmanta provides support for passing a list of Segment Custom ExternalIds through a dedicated URL query parameter sgmnt_ceids. For example, the following data

"sgmnt_ceids": [
    {
       "collection": "users",
       "encoding": "none",
       "id": "1234567890",
       "type": "phoneNumber"
     }
]

is to be passed as:
sgmnt_ceids[0][collection]=users&sgmnt_ceids[0][encoding]=none&sgmnt_ceids[0][id]=1234567890&sgmnt_ceids[0][type]=phoneNumber

Or for both embed types:

<script>
        window.SEGMANTA__USER_METADATA = {
            "sgmnt_ceids": [
    {
       "collection": "users",
       "encoding": "none",
       "id": "1234567890",
       "type": "phoneNumber"
     }
]
        }
</script>

Note: The externalId encoding field is always set to “none” and is not needed to be passed in the querystring. The collection field value is assumed to be ‘users’ if omitted.

Expert Tips!

  • Label everything that is or might be relevant for you to pass to Segment. If a question, subject or answer choice is not labeled with a key and/or value, you will not have what you need to locate the data in Segment.
  • Only events that are toggled on will be sent to Segment. You will not be able to retroactively send previously collected data using this integration.
  • Warning! If you add your Segment Write Key to a Survey, you are responsible for the data collected by Segment.