Join Corey Koberg for an in-depth discussion in this video Understanding the GTM hierarchy, part of Google Tag Manager (V2) Essential Training.
- At the heart of Google Tag Manager is a container. This is what's going to contain all of your scripts and tags the system will inject into the page. To understand why this is important, let's look at the older model. Each webpage has the underlying HTML and scripts that render the page into what we see on the screen in the browser. This may include Analytics tracking scripts, AdWords conversion scripts, re-targeting scripts, marketing automation scripts, video tracking, special transaction tracking scripts that only go on certain pages once a transaction has occurred, and so on.
Now which scripts and tags get loaded isn't decided back when the code is published to the website, but in real time when the user loads the page on the browser. This is a much cleaner structure, and also gives you enormous flexibility in terms of what to load and under what circumstances and conditions you will fire the various tags. Now while the container itself is the main workhorse, there's more we need to understand. The container that sits on the pages holds three types of entities: tags, triggers, and variables. Tags are the code snippets that collect and manipulate the data.
The most common example of this is your web analytics tags, but there are literally thousands of tags that perform a similar function. Some are already built into Google Tag Manager, but you can also create your own custom HTML and image tags. Triggers, formerly known as rules, are the rules and conditions that you'll specify that tell Google Tag Manager when to fire each tag. For example, you may have a trigger that looks for your thank you page URL and then fires the various conversion tracking tags. Variables, formerly known as macros, are bits of information that can be stored and accessed by your tags and triggers.
Some are automatically populated by Google Tag Manager, such as the value of a URL. Some can be populated by the user, such as your specific account numbers, or even dynamic values, such as transaction amounts. You can also have multiple containers as we see here, each of which will hold its own set of tags, triggers, and variables. These are all accessible via your Google Tag Manager account, which is accessed via your log in, also known as your Google account. In this example, our single Google Tag Manager account, Cardinal Path primary, is accessed via our Google log in, firstname.lastname@example.org, and holds two containers.
The first is for www.CardinalPath.com domain, and the second for CoreyKoberg.com. This difference between a Google account, which is your log in, and the Tag Manager account is very similar to those of you who are used to having a Google log in and a separate or potentially multiple Google Analytics accounts or Google AdWords accounts. In fact, because so many of you are used to the Google Analytics hierarchy we've discussed at length in my Lynda Google Analytics courses, we'll use that as an analogy. Now while not an exact analogy, you can see the similarity where we have a single Google log in and potentially multiple Google Analytics or multiple Google Tag Manager accounts that are going to be controlled by that same log in.
Inside those accounts we can have one Google Analytics web property per domain or website, and similarly, one Google Tag Manager container. Now in Google Analytics, the web property holds the views and filters while the container holds the tags, triggers, and variables. Okay, let's take a quick look at the interface to see how this all fits together. When we go up here to tagmanager.google.com to ensure we're on this new v two interface, and we see here the various accounts that my Google log in has access to. Over here on the right, we've got a Lynda account, and under here I've got two different containers: hansel and petal and CoreyKoberg.com.
If I click into this, I'm going to go into the container for that one. Okay, and on the left we can see the tags here as well as the triggers and the variables for this particular container. Okay, now that you have the lay of the land, in the next few videos we're going to create our first set of these from scratch and put this all to work.
This course provides the skills to get up and running with Google Tag Manager quickly. It explores how to set up Tag Manager accounts and containers, use turnkey tags, create rules and macros, control versions and user access, debug tags, configure custom tags, and add code to capture specific Google Analytics events. Authored by GTM expert Corey Koberg, this course also provides crucial, time-saving best practices for working with Tag Manager.
Note: to keep the training as universal as possible, we use the nonmobile version of GTM, and configure it for a generic WordPress site. Your specific implementation will be dependent on how your site is coded.
- Creating an account and container
- Installing containers
- Using built-in tags from Analytics, ClickTale, and other services
- Working with variables
- Firing events with triggers
- Creating versions
- Using custom tags
- Implementing a data layer