Google offers a number of tools that help you learn more about your users and Google Tag Manager (GTM) may be the most powerful tool in the arsenal. While GTM doesn’t actually collect data on your users, it simplifies and demystifies the means by which you collect that data.

Even as a developer I find Google’s documentation to be a bit dense at times, but for good reason! They’re addressing all of the functionality needed to accomplish complicated business goals. But for the small marketing team who may not have the resources, digging through the documentation can be quite daunting. Here we break down the essentials to get you up and running with Google Tag Manager.

What is Google Tag Manager?

GTM is a “container” in which you place scripts & marketing pixels, often referred to as “tags”. Once the container is placed in the code of your site, it will load each of the tags contained within. The GTM container can hold anything from other Google tools (such as Google Analytics, Adwords conversion tracking pixel, and Google Optimization) to select 3rd party tools (Crazy Egg, Hot Jar, and LinkedIn Insights) 0r even custom tags that you create yourself.

The Benefits.

GTM offers a number of benefits to marketers and developers alike. For one, it keeps everything clean and organized. Utilizing folders allows your team to segment tags however you’d like. We’ve often seen tags segmented by type or team.

Type segmentation could be as simple as creating two folders: “Google Analytics” & “Third Party”.  In our Google Analytics folder, we’ll add the main google analytics tag, as well as a number of event and transaction tags. For larger projects, keeping your google tags separated from everything else can be helpful as you often end up with quite a few event tags that can eat up space in your tag view. Your Third Party folder will house any third party/custom tools you’ll be using on the site.

Team segmentation can be useful when you have multiple teams working for the brand. Maybe you have an advertising agency who needs to add tags to track campaign performance and your development team uses Google Optimization to A/B test functionality. As a hypothetical, lets say you decide to hire a new advertising agency (agency B) after a few years working with a previous agency (agency A). Many times, ad teams utilize different tools and they don’t always overlap. If you’ve utilized team segmentation, agency B could set up their own folder and we could easily delete all of agency A’s tags, as they are no longer useful. Without segmenting folders, we would have to dig through each of the site’s tags to find the correct ones to remove.

Another organizational benefit is to your code base (i.e. a benefit to your developer!). Tags often need to be placed on specific pages (like campaign landing pages or checkout pages) or specific sections of the code (like buttons). In the past, a developer’s code base would be littered with tags. Now, we can keep all of the tags in Google Tag Manager and simple load one script on the page. This keeps the code clean and your developer happy.

In addition to Organization & Marketer Independence; Versioning, and Testability are all huge benefits to using Google analytics. I’ll be addressing these as we continue with our setup.

Okay, enough with the introduction. Lets Dig In!

Setting up your GTM Container is simple. From tagmanager.google.com, you’ll simply click the “Create Account” button at the top of the page. If you don’t use Google services, you may need to create a gmail account to gain access.

 

Next, you’ll set up your account by adding a name. usually this would be the name of your business. For this example, I’ll use our company.

 

Then  you’ll set up your container. In this case, we’ll use www.blkdg.com and select “Web” under Where to Use Container, since this is a website. As you can see, there are also the options of setting GTM up on native iOS & Android apps, as well as AMP pages. We won’t worry about those in this example.

 

Next, you’ll receive the tracking code to place on your site. Once the tracking code has been placed, you can begin utilizing GTM!

 

Tags, Triggers & Variables.

Before we start creating, lets walk through these three terms we’ll be using quite a bit.

Tags

A tag is a piece of code that sends data to a service. A service could be Google Analytics or another 3rd party like Facebook.

Triggers

A trigger tells a tag when to send data. For instance, If we set up a Google Analytics event to tell our analytics account when someone clicks on a button, the trigger would be the button click.

Variables

Variables are used in both Tags and Triggers. In tags, we use variables to send dynamic data to the third party. A simple example would to set up a variable for our Google Analytics account number. We can then add the variable that represents the account to all of our event tags, to tell GTM where we want to send the event to.

In Triggers, variables are used as a filter. If we had a Google Analytics event set up to track button clicks from a specific campaign page, but we have buttons on many of the campaign pages on our site, we could set the URL variable to our specific campaign page, so the event only triggered from that page.

We will be utilizing all three of these elements throughout the example below.

Setting Up Google Analytics.

In most cases, the first tag we’ll set up is Google Analytics. Since this is a Google Service, they make it very easy to set up.

We start by clicking “Tags” in the lefthand menu. Then clicking the red NEW button.

 

We then name our tag and choose a tag type. In this case, we’ll simply call it “Google Analytics”.

 

From there, we will select “Universal Analytics.” As you can see, if you scroll down the list, there are quite a few options. As a side note, it might be a good idea to investigate all of the different tag types that are available. It will give you some great insights into all of the major services available to you and may even give you some ideas on how to maximize you site’s potential.

Next, you’ll set up your Universal Analytics tag. You’ll want to set the Tracking Type to “Page View”. Under “Google Analytics Settings” we will utilize our first variable. From the drop down, you’ll select New Variable. Since we’ll be using Google Analytics to track multiple events, it is nice to have the GA id available to you at all times. The variable type will already be set to Google Analytics Settings, so you simply need to find your GA tracking ID and add it to the field. Then click save in the top righthand corner.

 

Once you save your variable, you are done configuring the Tag! Now all we have to do is tell the tag when to fire. Next, click into the “Triggering” box.

 

Since GA needs fire on every page view, we’ll select all pages from the list of triggers. Since this is a new GTM Container, we only have a couple triggers to choose from. You can create as many custom triggers as you like depending on your needs.

So now, we have our Tag configured and set to fire on all page views. That’s it! Below is what your Tag should look like when its all finished.

 

Testing

Once you’ve saved your new tag, you’ll want to make sure its firing. GTM has a great preview mode that allows you to test before publishing the tag; just click the PREVIEW button at the top right hand side of the GTM dashboard. Preview mode allows you to view the site with your tag running, before

You’ll know right away if you’ve successfully enabled Preview Mode, as a large orange box will invade your dashboard.

Once in preview mode, Google will place a cookie in your browser that will prompt the preview pane to load whenever you visit the site. As you can see below, our new Google Analytics tag fired! Great Job!

When you’re finished testing your tag in preview mode, you can publish the container by hitting the submit button at the top righthand side of the dashboard. You can even give your saved version a title and leave notes about the changes you made. You are officially sending data to Google Analytics through Google Tag Manager.  Dont forget the turn off Preview Mode!

While this is probably the simplest usage of Google Tag Manager, it is a great jumping off point. We will generally tell clients to establish measurable goals on their website and from there, we can derive a plan to track those goals using various tools served through GTM.