Turn your website into a tracking machine by mastering Google Tag Manager
Advanced Google Tag Manager
By Simo Ahava, Senior Data Advocate @ 8-bit-sheep
Course length: 6h 19min
Some of the companies that train their teams at CXL Institute:
Do you feel like you know Google Tag Manager, but there’s a lot more to know?
Here’s your chance to master Google Tag Manager’s complexities with Google Developer Expert Simo Ahava.
This is what this course is about.
In this 9-lesson training program, you’ll learn
- Customizing GTM event tracking to track interactions on a site
- Customizing your Google Analytics setup using Tasks API, hitCallback, the Google Analytics Settings variable, and regular expressions
- Ins and outs of the dataLayer
- Turning GTM into a true force of power in your data organization
Introduction video (5 min)
Get more confidence with the technology stack of the web
Google Tag Manager sits firmly in the fascinating interface between different parts of the organization: marketing, IT, HR, sales, and products & services.
To understand this interplay between the different departments of an organization and the systems they use to communicate data to and from the website, it’s important to understand the web browser and how GTM is firmly entrenched in the capabilities and limitations that the browser technology stack imposes.
Learn ins and outs of Data Layer
In this course, you’ll learn about the multiple faces of the Data Layer. You’ll understand how the Array is actually just a message bus, feeding messages to Google Tag Manager’s internal data model. You’ll learn how Google Tag Manager introduces an imitation of “state” in the browser, and how you can use this to your advantage when passing data to and from the website.
Understanding the interplay between the website, the Data Layer, and Google Tag Manager is vital if you want to make the most of the tool.
Understand how Google Tag Manager works under the hood
Much of this course will be about how Google Tag Manager works under the hood. It’s not just a theoretical exercise, though, as the learning curve of GTM is very steep and necessarily involves understanding how things like GTM’s data model, event tracking, and end-to-end debugging work. These lessons can be easily translated to actual use cases, and you can use this knowledge to make the container more than just the sum of its parts.
This course is right for you if…
- You want to know how to make GTM management easier with the API
This course is probably not for you if…
- You are looking for a deep-dive into mobile GTM or the GTM programmatic API
- You are only just starting with GTM and don’t like technical descriptions, live coding, or browser developer tools
- Web analytics deployment and implementation is not important to you, or you think GTM replaces your IT department or developers
Skills you should have
- Intermediate understanding of how GTM works, especially how tags, triggers, and variables interact
- Basic understanding of how the web browser works, especially when it comes to event tracking, the Data Layer, and Chrome’s developer tools
Simo Ahava is a recognized expert on customizing web analytics and tag management solutions to improve the entire “life cycle” of data collection, processing, and reporting. His main areas of expertise lie with Google Analytics and Google Tag Manager. Google has appointed him as a Google Developer Expert in these fields.
Simo holds the position of Senior Data Advocate at 8-bit sheep. He also writes a popular blog on all things Google Analytics and Google Tag Manager development at www.simoahava.com.
An experienced speaker and prolific blogger, Simo can be seen and heard in conferences, product forums, support communities, and developer meet-ups alike.
Your full course curriculum:
Advanced Google Tag Manager
Welcome to the Course
Event Tracking Under The Hood
In the first lesson, we’ll start with Google Tag Manager’s event tracking model. You’ll learn about GTM’s data model, how the dataLayer interacts with GTM’s complex data structures, and how automatic event tracking makes use of these interactions to help you track user activity on the website.
- What happens when you execute a dataLayer.push() - and understanding this is crucial if you want to build and design complex Google Tag Manager implementations.
- How to use auto-event tracking effectively - and why this is one of the most useful ways to put Google Tag Manager to use on a site.
- How to solve issues with GTM’s auto-event tracking - and how you can save hours of detective work once you figure out the common reasons for why event tracking breaks.
Custom Event Listeners
Using Google Tag Manager’s auto-event tracking is great when you want to measure clicks and form submissions. But what if you want to measure interactions with your form? Or when the user hovers over an image but doesn’t click it? Or how much time the user actually spent on the page? You’ll need to create your own event listeners for these use cases.
This lesson will cover:
- What different types of browser events can be tracked - and just how much potential there is in tracking these with Google Tag Manager.
- How to build your own event listeners - because sometimes GTM’s own native auto-event listeners are simply not enough.
The Tracker Object
Google Analytics uses a tracker object data structure to make sure that interactions on the website are compiled into well-formed Google Analytics requests and hits. In this lesson, we’ll discuss how this tracker object works, and why it has some serious implications for Google Tag Manager implementations.
- How the tracker object works - and why it’s such an important asset in building Google Analytics tracking on a website.
- How the tracker object interacts with Google Tag Manager - spoiler alert: it’s not smooth sailing. GTM has an idiosyncratic approach to how it utilizes the tracker object.
- How to identify and fix issues with single-page applications - the biggest problem is how to measure single-page applications correctly in Google Analytics, when using Google Tag Manager as the implementation tool.
customTask is the greatest tool at your disposal for customizing your Google Analytics implementations. In this lesson, we’ll discuss why this is so, and how you can do things like PII removal and hit multiplication with ease when using customTask.
This lesson will guide you through:
- What “tasks” in Google Analytics are - and how each one contributes to building the GA hit.
- How customTask works and what makes it special
- What you can do with customTask - and how you can utilize tools found online to make every line of code in customTask count.
Enhanced Ecommerce is one of the most interesting reporting models in Google Analytics. However, implementation is not straight-forward, and many of the quirks with Enhanced Ecommerce are poorly documented. With this lesson, many of these features become more clear, and your future implementations will thank you.
- The role of the dataLayer in Enhanced Ecommerce - and how the rigid data structure can be its own undoing.
- Lessons learned through years of experience - there are lots of “huh?” situations with Enhanced Ecommerce data, and we’ll go over some of the more prominent ones in this lesson.
API Outline And Resources
Google Tag Manager’s API can save your organization hundreds of hours of manual labor, as you learn how to write scripts that automate many of the menial tasks. If you’re struggling with dozens of containers that require constant upkeep, the API will soon become your best friend.
This lesson will guide you through:
- What the GTM API is - and how it will save you time in the long run.
- What resources and methods are available through the API - including many use cases for which the API can be a life-saver.
- How to try out the API - and just how easy it is to use the tools available.
Build Your Own API Tool
We’ll take the learnings from the previous lesson, and put them to practice in this one. You’ll learn how to build a simple but extendable Google Sheets extension, which pulls in data from the Google Tag Manager API.
Set yourself up for success with:
- How to build Google Sheets extensions - it’s easier than you think!
- How to utilize the Google Tag Manager API in Sheets’ Apps Script - build your own documentation tool that you can start using immediately.
In this lesson, we’ll cover:
- How the template editor works - and how you can navigate it for testing and debugging, too.
Build Your Own Custom Template
You’ll put the learnings from the previous lesson to good use as you build your own Custom Tag Template. You’ll also learn the end-to-end process of building and distributing a template.
In this last lesson, we’ll cover:
- How to build the fields, the code, and the permissions of a custom tag template
- How (and where) to distribute it to maximize your brand visibility
Show off your new skills: Get a certificate of completion
Once you’ve completed the course, pass a test to get certified. Add it to your resume, your LinkedIn profile or just get that well-earned raise you’ve been waiting for.
Get this course and 50+ others when you sign up for CXL Institute
This course (and all others – full list here) are included with the CXL Institute subscription.
At CXL Institute, you can take online courses on growth, digital marketing, optimization, analytics, persuasion – all in a single subscription.
- World’s leading practitioners teaching you their best stuff.
- 50+ online courses on all things data-driven marketing
- New courses added every single month
Sign up for CXL Institute and get access to
- 50+ courses (full list here) on all aspects of data-driven marketing (new courses added every month)
- 4 Minidegrees that give you advanced level skills
- Talk recordings by world class practitioners at CXL Live and Elite Camp
Got a team, multiple users? Get our Teams All-Access plan instead.
The CXL Institute guarantee:
- 7-day no questions asked money back period
- You can immediately apply learnings and improve your results.
Need help convincing your boss?