Using the Email Embed code with your mailing platform to dynamically insert survey parameters

By using Emailing Platforms dynamic Templating systems you can attach extra information to your embedded email campaigns for better correlation and tracking.

Note: Each emailing platform varies when it comes to their templating languages. You should consult your own emailing platform's documentation to understand how to dynamically substitute email tokens into the embed html.

When you are distributing a survey by email, it's usually beneficial to track where the user clicked through from, such as using UTM tags to track how your campaigns are performing or substitute in the user's external identity to correlate their answers later.

To start you need to make sure you have a survey where the first question is a supported question type. If you would like to know how to set up an email embed survey, you can read more about that here

  1. Enter your surveys distribution settings page, and select "Email Embed". You will be presented with an options screen such as the below;
    Screenshot 2021-08-05 at 21.26.11
  2. Select your options about how you would like your survey to behave, such as overriding the first question text and subtitle, and some basic design settings. Click the button that says "Get Code".
  3. Copy the code into your email marketing tool into the "HTML" view. To find how to insert custom HTML into your email templates, please consult your email marketing tool's documentation.

  4. Use the marketing tool's token syntax to place variables on the ends of the URLs for each of the questions that you would like to tag. An example of the email embed output can be seen below (shortened for readibility).
    <div class="segmanta-email-embed" style="direction: ltr; color: rgb(0, 0, 0); padding: 8px; border-radius: 4px;"> 
    <table style="width: 100%;">
    <tr align="center">
    <td style="padding-bottom: 15px;">What did you think of this email?</td>
    <tr align="center" style="font-size: 13px; font-weight: bold;">
    <td style="padding-bottom: 10px;">On a scale of 1 through 5, how interesting was this email?</td>
    <table style="width: 100%;">
    <tr align="center">
    <tr align="center">
    <td style="width: 45px; padding-right: 8px;">
    <a target="_blank" href="" class="seg-hoverable" ....

    Note: The Bolded part is an example of the Segmanta URL that must remain intact for your survey to receive the correct values. It is therefore advised that all additional URL parameters are added to the end of URLs.

  5. Modify each Segmanta anchor tag with your desired templating tags, such as by adding the seg_erid parameter to track who is answering your survey. You can read more about the seg_erid parameter here.

    Note: This is an example of using hubspot markup language.{{ personalization_token('', '') }}
  6. Test your survey by scheduling a send, clicking the link, and seeing that your parameters and answers are being passed to your survey.


Tip: The code that is copied is standard HTML, and can be modified in any way that you'd like. The only "special" parts of the code that are copied are each of the URLs in the code that have specific parameters which instruct the survey which answer was selected and must be left intact.