Google Tag Manager

Google Tag Manager (GTM) provides an easy way to add tags and triggers. It requires little to no coding to setup Blitzllama and can be deployed in minutes. Once Blitzllama Tag is integrated with GTM you will be able to create users, add user attributes and launch surveys.

Installing Blitzllama tag with GTM

Step 1: Initialise Bltizllama Tag

  • Open the Google Tag Manager app and click on Tags Tab.

  • Click on new Tag and click on Tag Configuration section. Under the "Discover more tag types in the Community Template Gallery" option search for Blitzllama Tag

  • Click on Choose Template to add Blitzllama Tag to your GTM.

  • Copy API_KEY from Connections > Web on the Blitzllama dashboard.

  • Under API key section in Blitzllama GTM template paste the copied API_KEY.

Step 2: Manage users

There are two ways to manage users, you can either assign a unique user_id to each user or keep the users anonymous.

a. Identify users with user_ids (recommended)

  • Make sure to set Action Type to User Id.

  • Now click on Triggering Section, to choose the trigger.

  • Select All Pages (recommended) or on Some Pages as the Trigger.

  • Click on save button to save the changes to Blitzllama Tag.

  • Click Submit and then Publish to push your changes.

Read more about the variables here GTM variables and triggers here Triggering Section.

b. Users are not assigned user_ids but are anonymously surveyed

  • Make sure to set Action Type to Install.

  • Now click on Triggering Section, to choose the trigger.

  • Select All Pages as the Trigger.

  • Click on save button to save the changes to Blitzllama Tag.

  • Click Submit and then Publish to push your changes.

Step 3: Send User Attribute to Blitzllama (optional)

Adding user attributes will help in understanding user and creating cohorts for targeted surveys.

  • Set Action Type to User Attribute.

  • In Attribute Key text field, enter the user attribute field name you wish to send to Blitzllama.

  • In Data Type drop-down, select apt data type (string, number, boolean, date) of the Attribute Value variable.

  • Now click on Triggering Section, to choose the trigger.

  • Select on appropriate pages or click actions (ensure the attribute value will be available when the tag is fired) as the Trigger.

  • Click on save button to save the changes to Blitzllama Tag.

  • Click Submit and then Publish to push your changes.

Ensure user creation Blitzllama Tag is called before User Attribute Tag. Click here to read more on Trigger Sequencing.

Step 4: Setup survey triggers

There are two ways to trigger surveys inside your web application.

You can also use backend events to launch in-app surveys. Check out for more details.

a. Creating triggers on Blitzllama's dashboard

Refer to this section: creating triggers on the web triggers

We suggest creating triggers the above method, instead of triggering surveys via GTM (below section), as it requires a new GTM tag to be created for every trigger.

b. Trigger Survey based on GTM triggering (optional)

  • Set Action Type to Trigger Survey.

  • In Trigger Name text field, enter the Trigger Name that is configured on Blitzllama dashboard.

  • Now click on Triggering Section, to choose the trigger.

  • Select All Pages as the Trigger.

  • Click on save button to save the changes to Blitzllama Tag.

  • Click Submit and then Publish to push your changes.

You can also use backend events to launch in-app surveys. Check out https://documentation.blitzllama.com/connections/backend-trigger for more details.

You are all set to launch your first Blitzllama survey using GTM!

DataLayer

A data layer is a JavaScript object that is used to pass information from your website to your Tag Manager container. You can then use that information to populate variables and activate triggers in your tag configurations. Click here to read more on DataLayer

<!-- Global site tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-YYYYYY"></script>
<script>  
    window.dataLayer = window.dataLayer || [];  
    dataLayer.push({
      'event': 'signup', 
      'username': 'jane doe',
      'age': 25,
      'userid': 'user-123'
    }
</script>

Setting GTM variables to set to DataLayer variable

  • In Google Tag Manager, click Variables. Under User-Defined Variables, click on New Button.

  • Enter the appropriate variable name.

  • Under Variable Configuration, click on choose the variable type and select Data Layer Variable option.

  • In Data Layer Variable Name text field, enter data Layer variable you want set as variable.

  • Click Save.

Last updated