Google Tag Manager is one of the most powerful tools that you can on your website or mobile application.
In this article, we’ll define exactly what Google Tag Manager actually is, why you should use it and how to set it up.Listen on iTunes Listen on Stitcher Listen on Spotify Listen on Soundcloud
Table of Contents
- What is Google Tag Manager?
- Why you should use Google Tag manager
- Setting up Google Tag Manager & installing Google Analytics
In a nutshell, Google Tag Manager acts as a bridge between your website and your marketing scripts such as Google Analytics, Facebook pixel and many other tools that track website traffic.
Google Tag Manager consists of three core components:
Tags are marketing scripts or measurement codes that collect information such as Google Analytics or Facebook pixel.
For example, you may want to have Google Analytics loaded on all of your website’s public facing pages so the data can be recorded in Google Analytics. In that case, you would set a trigger to tell the Google Analytics tag to fire on all pages.
Variables then allow you to set specific controls and functions on how you want your tags and triggers to work.
One specific example, as shown above, is using Google Analytics to fire on all public facing pages, then setting a variable to not fire the Google Analytics tag for people that are site administrators or developers who are logged in to your website.
By doing so, we’re not counting their sessions against your public information or your public data.
In effect, you’re not getting an intermix of what people are doing on your team versus what the public is doing on your website which allows you to have clearer and more accurate tracking data.
This is just one example to show how powerful yet simple Google Tag Manager can be, allowing you to easily set and manipulate these variables to control everything.
Why you should use Google Tag Manager
The benefits of using Google Tag Manager can be broken down into three things.
First, using the tool saves you precious time. Whereas before, managing scripts and tags manually and without having a centralised way to manipulate and control them through a graphical user interface, takes a lot of time.
But now, with Google Tag Manager, you really don’t touch any code aside from copying and pasting stuff across the web. It really saves you so much time to do other stuff, such as taking care of your business.
Aside from being a time-saver, it also allows you to save on money. If you’re hiring people, you may have developers or marketing consultants on your staff. If the platform is already set up, it will save them a stack of time, therefore you save money and allows you to simply get more done.
It unlocks a lot of the functionality that would be very difficult to achieve prior to Google Tag Manager being put in place. It allows you to do more with your marketing scripts and with your tracking and analytics that otherwise would have been difficult to achieve in the past.
Let’s look at the old way of how you used to do these things prior to Google Tag Manager:
- You have to go into Google Analytics and get the analytics tracking tag.
- If you’re running Ads, you’d have to get the Google Ads tracking tag.
- If you’re using an additional marketing platform for CRO work such as Hotjar, you have to go into Hotjar and get the marketing tag.
- If you’re using things like LinkedIn conversion tracking, you’d have to go in and get the marketing tag.
- If you’re using things like CRM insights and tracking such as HubSpot, you have to get the Hubspot tracking tag.
Once you have all these tags, you basically put them all into your website’s source code for it to work. So that sounds like a lot of work – a lot of tedious work.
Now let’s look at this from an actual code implementation point of view. On the left-hand side of the image above, you can see where the marketing tags have been manually pasted one after the other in the header of the website so that they would function.
Google Tag Manager simplifies the process and replaces all of these. Basically, you just add these tags into Google Tag Manager using the graphical user interface, then Google Tag Manager controls how these tags feed into your website and what they do.
You only need to put in one script (see image on the right), and that’s it! Everything else is then controlled out of Google Tag Manager, making the actual code of the website cleaner and easier to maintain and manage.
Setting Up Google Tag Manager & Installing Google Analytics
Now, let’s dive into setting up and installing Google Tag Manager.
Create a new account and container:
- Create account – Once you’ve logged into Google Tag Manager, the first thing you’re going to want to do is hit the ‘Create Account’ button.
- Account name – Next, you want to start filling out the details of your Google Tag Manager account name. For this example, let’s use a demo site, the Google Merchant Store.
- Country – Since this is actually a global store but it’s headquartered in the U.S, let’s set the United States as the primary country of origin.
- Container name – Grab the URL and place it in the container name. Don’t include the https component and the backslash (/) and set it as a Web container. Then, click Create.
- Accept terms – Next, review the terms of service and click ‘Yes’ if you agree to the terms. And you now have your Google Tag Manager container set up.
Now don’t jump ahead and drop it into a website yet because it will do nothing. You actually now need to configure the container to function the way in which you needed it to function.
As you will see from below, if you go to the tag section, there’s nothing there that triggers anything, aside from a couple of out-of-the-box variables that Google Tag Manager provides when you install it. You will need to get this all set up first before you can put it into your website.
Install the container
Let’s start off with a simple, basic tag that you can put into Google Tag Manager, which is Google Analytics.
- So from the tag screen, hit the ‘New’ button.
- Call the tag ‘GA-Universal Analytics’, where GA is short for Google Analytics. I recommend using these short form tags when you’re creating it and you’ll see once you have a very well built out container as to why you want to use this type of naming convention.
- Choose ‘Google Analytics’ as the tag type because you want to track page views of your website. Google Tag Manager has a lot of these tags pre-built. You can see from the image below that there’s heaps of them, so it will save you time by simply selecting one that exists in Google Tag Manager. If you don’t see the platform of the tag that you want to integrate listed out, you can always create a custom HTML tag.
Once you’ve create the tag, you now need to create a new variable.
This is how you’re going to assign the Google Analytics profile to the Google Analytics tag:
1. Let’s call the new variable ‘Google Merchandise Store GA’ where GA is for Google Analytics.
2. Set the Cookie domain to Auto. Next, go back to your Google Analytics account to get the Google Merchandise Store demo tracking ID, which in this case is UA-54516992-1.
3. Paste the tracking ID in Google Tag Manager and hit Save.
Create a trigger
Next, set a trigger for this tag to fire on all pages and hit Save.
You’re done! You have created your first tag. If you were to go ahead and drop Google Tag Manager into your website, Google Analytics will load on all pages and will be delivered into the site via the Google Tag Manager script. It’s that simple!
If you want to learn more about Google Tag Manager and data-driven digital marketing, subscribe to our blog so you don’t miss out on any new articles.
Are you using Google Tag Manager for your business? I’d love to know what your thoughts are on the platform. Leave me a comment below!