Google Tag Manager
Last updated
Last updated
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.
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.
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.
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.
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.
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.
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!
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
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.
Click on , and choose the variable you would wish to use as UserId. Read more about the
In Attribute Value field, click on , and choose the variable you would want.