Labeling a Survey for Google Tag Manager

Label question pages and answer choices to pass data to Google Tag Manager for use as triggers

Google Tag Manager (GTM) is a tag management system that allows you to quickly and easily update and manage tags and code snippets on your website or mobile apps, or, in this case, your Segmanta survey. 

You can integrate your GTM Container ID with a Segmanta survey and deploy pixels across your survey immediately. However, if you'd like to use GTM to fire more specific events based on survey events, you will need to use information passed via the data layer as your GTM triggers.

To begin labeling your survey for use as a Data Layer Variable, you must first set up the basic GTM integration on your survey. After the integration is set up, follow the steps below:

Defining Data Layer Variables in Segmanta

1. Visit your Segmanta survey > Configure > Integrations

2. Select Google Tag Manager 

3. Add a label for each event that you want to send to GTM. You will need to utilize these labels when setting up Data Layer Variables in GTM.

Setting up Triggers Based on Data Layer Variables in GTM

1. Visit your GTM account and click Triggers > New.

2. Name your trigger

3. Click Trigger Configuration

4. Select Custom Event

5. Paste or type the relevant Event Name

There are four (4) possible Event Names. Make sure that you copy & paste or type the event name exactly as listed below.

  • page-viewed
  • page-answered
  • ending-reached
  • ending-link-clicked

At this point you can choose to save your trigger. The trigger will fire every time any "Event Name" fires from Segmanta on any survey where you have a GTM container integration. Or, most often you will want to customize the trigger further by following the steps below:

6. Select Some Custom Events

7. Open the Click Text dropdown menu and select New Variable from the bottom of the list.

8. Click Variable Configuration

9. Select Data Layer Variable

10. Under the Data Layer Variable Name field, insert the relevant Data Layer Variable Name as listed in this article. Make sure that you copy & paste or type the name exactly as it appears in the article. 

11. Name your variable something you can recognize for use in future triggers.

Expert Tip: Once you have set up a Data Layer Variable Name for the relevant Segmanta event, you will be able to select this Data Layer Variable in your Custom Events dropdown for future triggers. You do not need to recreate a new Variable if you are using the same Segmanta event. For example: once you have created "survey_public_id" Variable one time, you can select this from the dropdown menu rather than creating it again.  

12. Click Save

13. Choose the relevant condition such as "Equals"

14. Type the value for the condition. This should match the same exact Label that you inserted in your Segmanta integration manager for the event. Make sure that you insert the label exactly as you typed it in your Segmanta editor.

15. Click Save.

16. Your trigger is now ready for use with any tag in your GTM.

Google Tag Manager is available under Advanced & Enterprise plans only. For more information send us an email

By setting up a GTM integration, you are responsible for any data passed to Google Tag Manager or any applications integrated via GTM.