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, 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.

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 9-lesson 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 (5 min)

video

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

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 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

Lesson 1

Welcome to the Course

Lesson 2

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.

You’ll learn:

  • 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.

Lesson 3

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:

  • How the JavaScript event handling model works  - and how you can utilize it to fix issues with tracking form submissions, for example.
  • 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.

Lesson 4

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.

We’ll address:

  • 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.

Lesson 5

customTask

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.

Lesson 6

Enhanced Ecommerce

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.

We’ll cover:

  • The role of the dataLayer in Enhanced Ecommerce - and how the rigid data structure can be its own undoing.
  • How to use the Custom JavaScript variable method - useful if you don’t want to be subservient to a costly refactor operation on your Ecommerce dataLayer.
  • 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.

Lesson 7

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.

Lesson 8

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.

Lesson 9

Templates Introduction

Custom Templates in Google Tag Manager allow you to build branded user interfaces for the custom scripts that would otherwise need to deployed with Custom HTML tags and Custom JavaScript variables.

In this lesson, we’ll cover:

  • Why you should get into the habit of using Custom Templates - and why getting rid of Custom HTML tags and Custom JavaScript variables is a good idea.
  • How the template editor works - and how you can navigate it for testing and debugging, too.
  • What the “Sandbox JavaScript” is and what you need to know about it - why has GTM created its own flavor of JavaScript, and how does it work?

Lesson 10

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

Lesson 11

Wrapping Up

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: