The Segmanta External Respondent Parameter (‘seg_erid’)

Denote a unique, external respondent ID from your source system into a survey

If you are sending your survey to previously identified users from your source system (i.e., a Salesforce Record ID, Segment ID, or Janrain ID), it is recommended that you pass their ID to the Segmanta survey you are distributing by using the Segmanta External Respondent Parameter, the URL query parameter named seg_erid.

Passing the Segmanta External Respondent Value

In a non-embedded survey

When passing the Segmanta External Respondent Parameter to a non-embedded survey, (a survey that does not appear inside of a website and is distributed via URL), the parameter name ‘seg_erid’ should be appended using an equivalent of the encodeURIComponent, while its value should change with each survey respondent and also be encoded using the equivalent of the encodeURIComponent.

For example, if you would like to associate a Salesforce Record ID to each unique respondent of your survey, you would pass the seg_erid as a URL parameter by building your distribution link as follows:

https://surveys.segmanta.com/publicid/?seg_erid={$Salesforce_Record_ID}

Where publicID is a placeholder for the unique Segmanta ID for your survey that can be found in the Distribute > Link section of your survey’s editor and {$Salesforce_Record_ID} is a placeholder that should be replaced with each respondent’s Salesforce Record ID.

In an embedded survey

When passing the Segmanta External Respondent Parameter to a survey embedded inside of a website either through the Dynamic Embed tool or an inline embed, the ‘seg_erid’ parameter should be included in the global variable SEGMANTA__USER_METADATA embedded inside a script on your website.

For example, if you would like to associate a Salesforce Record ID to each unique respondent who takes your website survey, you could pass the seg_erid as a URL parameter by building your distribution link as follows:

<script>
window.SEGMANTA__USER_METADATA = {
"seg_erid": "{$Salesforce_Record_ID}"
}
</script>

where {$Salesforce_Record_ID} is a placeholder that should be replaced with each respondent’s Salesforce Record ID every time he or she takes your website survey.

Functionalities Enabled Using the Segmanta External Respondent Value

Enhance integrations

Use the seg_erid parameter to denote a unique respondent that can be linked back to your Segment, Aimia and Salesforce integrations.

Ensure a consistent survey experience

Passing the seg_erid can ensure the survey experience’s consistency by identifying unique consumers and displaying their survey progress across different sessions, browsers and devices.

If the seg_erid is passed into a survey, the progress of that survey in a subsequent session will resume where a respondent with that seg_erid value last left off. For example, if a respondent takes a survey containing five questions and only completes three of those questions, in the next session that same respondent has the option to resume the survey from question four with his or her previous responses for questions 1-3 pre-filled out.

Surveys embedded via the Dynamic Embed can also send events based on a unique seg_erid value. For example, by configuring the check_respondent_on_server parameter, you can interrogate the server via the seg_erid to understand whether the user has completed the surveys or not (default to false).

window.SEGMANTA__DYNAMIC_EMBED_CONFIG = {
...
check_respondent_on_server: true,
}

In order to rely on the server for this, the seg_erid must be set in window.SEGMANTA__USER_METADATA, otherwise the check will default to cookies.