Google Tag Manager – Review
In this article about Google Tag Manager I will give you an overview about the important settings about tags, triggers and variables. Also how to organize best your GTM structure to keep a good overview. For more details you can have a look in the reffered links, mostly from google support and also from CXL blog articles and playbook.
Table of Contents
Your Introduction to Google Tag Manager Basics
Possible:
Better:
- For A/B testing ist not reccommended to use GTM since the script for a/b testing pageviews should be loaded on first place and not the GTM tracking code
Getting to Know GTM: Tags + Triggers
- Tag is used for “what” kind of platform e.g. facebook, GA, LinkedIn …
- Trigger is used for “when” it should trigger/record the tag e.g. pageview, scroll-down-to-50%,click specific link and so on
Getting to Know GTM: Variables
- Variables can have different values e.g. play video, widgets, cookies, google analytics settings, URL…
- “Information google tag manager needs in order to do his job”
Variables in Google Tag Manager are named placeholders for values that are populated when code is run on your website or mobile app. For example, the Tag Manager variable named “Page URL” returns the current web page URL.
Variables are used in both triggers and in tags:
- In tags, variables are used to capture dynamic values (e.g.: pass a transaction value and product ID to a conversion tracking tag).
- In triggers, a variable is used to define filters that specify when a particular tag should fire. (e.g.: fire a trigger when the url variable contains “example.com/index.html”).
Tag Manager provides a set of predefined built-in variables. Built-in variables handle most needs for tag and trigger configurations. You can also create user-defined variables for web pages or mobile apps to suit specific requirements that might not be covered by built-in variables.
Ressources:
Google’s Guide to GTM Variables
https://support.google.com/tagmanager/answer/7683056
Getting to Know GTM: Data Layer
Temporarily stored details like:
- Product data: Product name, price, category
- Marketing campaign information: Traffic source, medium
- Transaction data: Cart value, checkout date
- Customer information: New or returning customer
eCommerce perspective:
- each individual page has its own data layerbecause each individual page in this example is loadingTag Manager again and again and again
Ressources:
Google’s Guide to GTM Data Layer
https://support.google.com/tagmanager/answer/6164391
Getting to Know GTM: Organization
- Naming declaration for tags, trigger, variables is very important for good organization and structure!
- A good folder structre helps you for that organization
One account, multiple containers
Most organizations will set up a single Tag Manager account for all of their containers. Within that account, the most common practice is to use a unique container for each website or mobile app. For example, a bike shop has a website that is set up to showcase their business, and they have built an app to track workouts. They have set up four containers in Tag Manager:
- Container 1: Web container for a bike shop website.
- Container 2: Web container for a web app that tracks bike workouts.
- Container 3: Android container for a mobile app that tracks bike workouts.
- Container 4: iOS container for a mobile app that tracks bike workouts.
Ressources:
Google’s Guide to GTM Organization
https://support.google.com/tagmanager/answer/6261285
Regular Expressions for Google Analytics
https://www.lunametrics.com/regex-book/Regular-Expressions-Google-Analytics.pdf
https://www.bounteous.com/files/uploads/Regular-Expressions-Google-Analytics_2019.pdf
Bounteous:
https://www.bounteous.com/
Getting to Know GTM: Workflow
- Set up own workspaces for individual folder structure or specific variables
- Makes sense to use typically when you are more then 2 users who save changes
- If you use GTM alone probably the default workspace is enough
Ressources:
Google’s Guide to Publishing, Versions, & Approvals
https://support.google.com/tagmanager/answer/6107163
Google’s Guide to Environments
https://support.google.com/tagmanager/answer/6311518
Google’s Guide to Zones
https://support.google.com/tagmanager/answer/7647043
Getting Started: Creating Your First Tag
- Be sure to have only 1 pageview send from GTM to GA
Ressources:
Google’s Guide to Deploying Google Analytics
https://support.google.com/tagmanager/answer/6107124
Google’s Guide to Google Analytics Settings Variable
https://support.google.com/tagmanager/answer/9207621
CXL Playbook:
https://cxl.com/institute/playbook/create-a-tag-in-gtm/
Tracking Engagement: Clicks & Time
GTM – tags:
GTM – triggers:
e.g. clicks, pageview, links, timer
GTM – preview mode:
Ressources:
Google’s Guide to Click Triggers
https://support.google.com/tagmanager/answer/7679320
Google’s Guide to the Timer Trigger
https://support.google.com/tagmanager/answer/7679323
Tracking Engagement: Scroll
Scrolling is a non-interactive engagement which means it should not affect the bounce rate.
-> For that reason it´s better to set up “non-interaction hit > true”
Ressources:
Google’s Guide to the Scroll Depth Trigger
https://support.google.com/tagmanager/answer/7679218
Tracking Engagement: YouTube Videos
Set up YouTube Video Tag, Trigger, Variables:
Advanced:
Add JavaScript API support to all videos: Check this box to enable the YouTube iFrame Player API. For example, the enablejsapi parameter is appended to the YouTube video player URLs with a value of 1, allowing the player to be controlled via iFrame or JavaScript. Note: If the video is already playing when Google Tag Manager loads, this process will reload it.
Enable this trigger on: Choose the appropriate option:
- Loading of the container (gtm.js) is triggered as soon as possible when the page is loaded.
- Loading window (gtm.load) fires after all initial content on the page has loaded (default).
- DOM is ready (gtm.dom) fires after the DOM is ready to be parsed.
Note: Because the scroll depth trigger calculates the dimensions of a page as it loads, it’s a good idea to wait until the window is fully loaded before activating this trigger. Therefore, “window is loaded (gtm.load)” is recommended for best results.
YouTube video triggers work for videos that load both during and after page load. This requires at least one of the following to be present when Tag Manager loads:
- An embedded YouTube video
- The YouTube iFrame API script in <script>
Ressources:
Google’s Guide to the YouTube Video Trigger
https://support.google.com/tagmanager/answer/7679325
Personal feedback about the Google Tag Manager course:
Same like the other courses from Chris Mercer (Google Analytics for Beginners/Intermediate) I enjoyed how he teaches his courses and also from high level persperctives via lucidchart diagrams. It´s easy to follow him and his approach ‘TBV’ – test by verify gives the proof to all the assumptions he is telling.
1