Advanced Google Tag Manager [Online Course]

Turn your website into a tracking machine by mastering Google Tag Manager

Online course:
Advanced Google Tag Manager

By Simo Ahava, Google Developer Expert

Course length: 7h

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.

Once you’re ready to move past the basics, you need to realize that GTM is a javascript deployment machine. As an advanced level GTM user, you need to know how to work with APIs, data layer and event tracking.

This is what this course is about.

In this 6-class training program, you’ll learn

  • Understand GTM and the GTM data model, useful Javascript skills, and how to automate tasks using the GTM programmatic API
  • 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 (3 min)


One of the best, most informative classes I have ever taken. Simo is a fantastic teacher and even more knowledgable than I knew based on his blog.

Kim Towne, Senior marketing analyst @ Mindstream Interactive

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.

This course will help you understand the dynamic nature of JavaScript, and how things like event tracking and DOM manipulation can both work for you and against you.

A lot of hands on examples of truly advanced GTM principles.

Jesper Reinholdt, Digital Business Optimization Consultant @ Atcore

Learn ins and outs of Data Layer

It’s not hyperbole to say that the Data Layer is what makes GTM tick. To many, Data Layer is just a JavaScript Array that feeds data into Google Tag Manager. However, this is only a very small part of the whole picture.

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.

Simo’s class is the most exciting, actionable, rich, detailed, class I have ever taken. This class alone is worth the price of admission for a year to the Institute.  OMG. Thanks for bringing this to the world!

Fred Pike COO @ Northwoods Software

Sneak preview: Lesson 1

JavaScript For Google Tag Manager

  • This field is for validation purposes and should be left unchanged.

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.

JavaScript is ever-present when talking about “advanced” Google Tag Manager. The deeper you plunge into GTM, the fuzzier the line between Google Tag Manager and JavaScript become. At some point, you’ll find yourself coding more JavaScript than using the GTM UI in your daily work. The tips and tricks shared in this course will help you get a better grasp of the JavaScript paradigm you’ll need to subscribe to if you want to make the most of Google Tag Manager.

The course lays out the landscape for anyone wanting to level up, expand their understanding, and really begin to unlock the full power of Google Tag Manager. The example code/mini assignments and powerpoint slides are great resources to refer back to.

Thomas Scoggins, Freelance Web Analyst

The Advanced GTM course provides a deeper understanding about the fundamentals Google Tag Manager is built on. It is a challenging course but with this knowledge you can face any non-ordinary GTM implementation.

Jurri Gerretsen, Web Analyst @ Roompot

What made me take this course was that Simo was the curator. I was able to understand the data model GTM has, and also customize information being sent thanks to the customTask, having real problems and applications.

Fabio Vanden Broeck, Analytics & Tracking Specialist @ Mediagrif Interactive Technologies Inc.

This course is right for you if…

  • You want to learn how to best utilize GTM and how to use JavaScript for customizing web analytics tracking
  • You want to know how to make GTM management easier with the API
  • You need help with GTM or web tracking JavaScript issues

This course is probably not for you if…

  • JavaScript is alien to you, and you have no motivation to learn it
  • 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 scripting skills and understanding of JavaScript, especially DOM manipulation (you’ve taken Codecademy’s intro course or equivalent).
  • Basic understanding of how the web browser works, especially when it comes to event tracking, the Data Layer, and Chrome’s developer tools

About your instructor, Simo Ahava

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 Reaktor. He also writes a popular blog on all things Google Analytics and Google Tag Manager development at

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

Lesson 1

JavaScript For Google Tag Manager

We’ll go over some necessary JavaScript concepts you’ll need to understand to make the most of Google Tag Manager. Most of these have to do with manipulating the Document Object Model.

You’ll also get a refresher on function syntax, closures, callbacks, good coding practices, and how these all tie in with Google Tag Manager. It won’t be just a coding lesson--we’ll also learn some cool tips, tricks, and custom variables you can use to power up your container.

Topics covered:

  • Basic JavaScript concepts: Boolean logic, functions, closures, variable hoisting, global namespace, etc
  • Dealing with race conditions, asynchronous loading, jQuery, etc.
  • How to debug JavaScript in the browser.
  • How to execute JavaScript in Google Tag Manager.
  • Good practices for writing JavaScript in Google Tag Manager.

Lesson 2

Event Tracking

Event tracking is one of the defining features of Google Tag Manager. Using GTM’s native listeners, you can track user interactions on the site with great accuracy. However, there are pitfalls you need to be aware of, and we’ll cover these in this lesson.

We’ll also go over the steps to create your own custom listeners, talk a bit about event propagation, and discover how other JavaScript on the site can easily mess up your event tracking via GTM.

Topics covered:

  • How GTM’s triggers work.
  • How to debug GTM’s triggers and the underlying mechanisms.
  • What typically breaks event propagation.
  • How to create custom event listeners.

Lesson 3

The Data Layer

The Data Layer is another key feature of Google Tag Manager. It serves multiple purposes - acting as a message queue that feeds data from the website to Google Tag Manager (and back), as well as structures the data in GTM’s own internal data model. There are ways to manipulate the data in the data model, and we’ll take a look at these methods in this class. You’ll learn about Data Layer messages and events, about the interface to GTM’s data model, how to manipulate the data in the data model, and how this all relates to GTM’s core features like tag sequencing.

Topics covered:

  • The dataLayer array
  • State in Google Tag Manager
  • Debugging the Data Layer in Google Tag Manager
  • Google Tag Manager’s internal data model
  • Recursive merge and the Version 2 of the Data Layer Variable

Lesson 4

Advanced Google Analytics Tracking

Google Analytics is, for many, the main reason to migrate to Google Tag Manager. In this class, we’ll take a look at how you can use GTM to manipulate the data collection of GA, by focusing on advanced features like hitCallback, customTask, and the “transport” field. We’ll also go over things like cross-domain tracking, and how GTM interacts with the tracker object created by analytics.js.

Topics covered:

  • Google Tag Manager and the tracker object
  • Cross-domain tracking using GTM
  • customTask for advanced configuration
  • Enhanced Ecommerce tips and tricks

Lesson 5

The API, Tips And Tricks

In this final class, we’ll first do a live walkthrough of the GTM API, by programming a Google Sheets add-on, which pulls in information from Google Tag Manager. Not only will you learn about Google’s APIs and their authentication methods, but you’ll also have a good grasp on how to use these APIs to automate your own tasks. We’ll wrap up the whole course with a handful of tips and tricks learned after using Google Tag Manager since day 1.

Topics covered:

  • Quick overview of the Google Tag Manager API
  • Live coding lesson for pulling account/container data from the API into a Google Sheets document
  • 30 hand-picked tips from 5 years of working with Google Tag Manager

Lesson 6

Bonus session

In this bonus session, Simo will:

  • Tackle any lingering questions that attendees might have had in FB or the previous class chats
  • Repeat some of the key lessons from the previous five classes
  • Go through any material he might not have had time to visit during the five classes

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.

CXL Institute is an authorized LinkedIn education provider

You can add your education, certificates, badges – everything you learned and earned at CXL Institute into the Education section of your profile.

How to find CXL Institute on LinkedIn

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.

Some of the companies that train their teams at CXL Institute: