This guide will provide step-by-step instructions on how you can set up your Data Talks Web Tracking using Google Tag Manager (GTM). To do so, you need to create and configure our web behavioral GTM container.
In this guide we are going to create a new container, attach the Snowplow Custom Templates and create a functioning tag for the Page View events. In addition, the document provides the optional configuration required in order to capture the email of a logged in user.
After logging in, you need to create your account in GTM. NOTE: If you already have a container created for your account, you can skip this step and proceed directly to “Templates menu” below.
Fill the Account Name, Country and the Container Name fields accordingly. We will choose “Web” as the Target Platform.
Accept the Data Processing Terms by marking the checkbox at the bottom left and then Accept the GTM Terms of Service by pressing the Yes button on the top right corner.
On the Tag Templates menu, we select “Search Gallery”, and we search for the “Snowplow Analytics” tag template. Then we add it to the workspace by clicking “Add to workspace” and proceed with adding when the popup appears (we do not want to confuse it with the “Snowplow Analytics v3“).
We need to make an extra configuration on this template. So, after adding the template, we access it and click on the “Permissions” tab.
Similarly, we do for the Variable Templates, only this time we search for the “Snowplow Analytics Settings” and add it to the workspace (carefully to not mistake it with the “Snowplow Analytics v3 Settings). No extra configuration steps required for this template.
We click “New” in the User-Defined Variables (name this variable Snowplow Analytics Settings).
In the variable configuration we select from the Custom Templates the “Snowplow Analytics Settings”, then we configure the values. Once we are done, we click “Save”.
Please request the specific ID for your website (e.g. club-website) from Data Talks. No special characters are allowed.
Respect “Do Not Track”
State Storage Strategy
Cookie and Local Storage
Session Cookie Timeout
Maximum Local Storage Queue Size
Encode into Base64
Page Unload Pause Length
Tracker Endpoint Protocol
Use page protocol
Maximum POST Payload Size
Capture email address of logged in user (optional)
We need to create another variable in order to get a user’s login email as it’s identification.
We click “New” in the User-Defined Variables (this variable needs to be named userId).
In the variable configuration we select from the Page Variables the “Data Layer Variable”, then we configure the values. Once we are done, we click “save”.
Data Layer Variable Name
Data Layer Version
The following code needs to be inserted within the <head> of the page of the website in order to set the email address as the userId value.
Additionally, we need to make few adjustments into the Page View tag in order to make the setUserId tag work properly. At the bottom of the Tag Configuration, at the Advanced Settings → Tag Sequencing, we make the following adjustments.
Fire a tag before Page View fires
Don’t fire PageView if setUserId fails or is paused
We select “Submit” → “Create Version”.
We provide a name and a description for the version of the container and click “Create”.
From the 3-dot menu within the version page we select “Publish”.
This section provides the instructions for form tracking. We will have to repeat some of the steps from the pageviews, but with different configurations. Keep in mind that this is a complete custom implementation of the form tracking and it can be used independently from other tags.
We create a new Page View trigger, but this time on the “The trigger fires on” we select “Some Page Views”. When we select that choice, three fields will be prompted. We assign each field with the values in the following table.
The Third Field needs to contain the unique word included within the contact form Page URL (for example, demo or contact). That way, this trigger will be fired only when a user lands on this page.
We create a new tag, similarly to the Page View tag, of type “Snowplow Analytics” using the following table to configure it.
We use browser cookies that are necessary for the site to work as intended.
For example, we store your website data collection preferences so we can honor them if you return to our site. You can disable these cookies in your browser settings but if you do the site may not work as intended.
To personalize and measure the effectiveness of advertising on our site and other websites.
For example, we may serve you a personalized ad based on the pages you visit on our site.
The NID cookie contains a unique ID Google uses to remember your preferences and other information, such as your preferred language, your most recent searches, your previous interactions with an advertiser’s ads or search results, and your visits to an advertiser’s website. This helps us show you customized ads on Google.
To understand user behavior in order to provide you with a more relevant browsing experience or personalize the content on our site.
For example, we collect information about whic pages you visit to help us present more relevante information.
Hotjar cookie. This cookie is set when the customer first lands on a page with the Hotjar script. It is used to persist the random user ID, unique to that site on the browser. This ensures that behavior in subsequent visits to the same site will be attributed to the same user ID.
This cookie allows Youtube to check for bandwidth usage.
Registers a unique ID to keep statistics of what videos from YouTube the user has seen.