What did we do before Google Tag Manager?
Before we go into what is Google Tag Manager (GTM), what are the benefits of using it and if we are going to need it now we have the new GA4 ? (GA4 is set to track really basic events to track custom events you still need GTM). Let us examine how we survived without GTM or any tag management tool.
This means that we need developer input. As we know, it can be a time-consuming process to brief and explain to our developer why and what we need from them. The developers also need to fit it into their sprint if there isn’t a code freeze at the time.
With the need to make informed decisions with data, our portfolio of tools increases every year which means that we would need more and more additional time from our developers to add and update scripts. Also, we know that usually, marketing or analytics task is seen as a non-priority and will end up at the bottom of our dev to-do list.
That is where GTM comes in to help us and our developers save time.
What is Google Tag Manager?
GTM is a free tag management solution from Google which acts as a central deployment environment for different marketing and/or analytics tools. GTM lets you test tracking tags before you push them live which can be a very useful trick especially when you are trying to track a button or an action that is triggered immediately after the page is loaded.
Also, GTM allows you to change your tags and the way they work without changing the code on your site. Every modification is carried within the GTM user interface and once you’ve finished, just press publish and all your changes are pushed live. Simple and easy.
So, do you need GTM instead of GA?
The difference between GTM and GA is that one is a management tool and the other is a tracking tool.
In other words, you need both. One does not replace the other, they work together. So, within GTM you can create a tag for GA and other tools such as Google Ads, Facebook Pixel, etc.
Top 3 benefits of using Google Tag Manager
There are many more benefits than listed below, but we want to share the ones we think are the most important from our experience.
#1. Implementing tools faster
Before GTM, you would have needed a developer to install your GA tag and the waiting time would have been for days or even weeks. Now, for most simple tracking tools (such as Google Analytics, Facebook Pixel, DoubleClick, etc – most of these tools have a pre-set tag in GTM) all you need is just to have your GTM code snippet installed, create your tag, test it and push it live.
#2. Manage all your tools in one place
Not long ago, all your tags were coded directly into website source code or spread between your JS files. To change anything withing these tags you needed a developer to find them and to update them.
Now, is much easier, you have access to your tags in one place and you can modify or delete them without the help of a developer. You can even pause them if you do not need them until are required again.
#3 Ready-made Tag templates
GTM comes with many built-in tags for the most used tools today. Tools such as Google Analytics, Google Ads conversions, remarketing, Facebook Pixel, Hotjar, Quora Pixel, Twitter Tag and many more. Also, the number of custom-built tags from the custom template library is increasing every day.
This allows marketers with little or no coding knowledge to create and customize tags, without needing a developer at every step. It opens an infinite opportunity to track whatever you need, and think is useful for your business/campaign.
How does Google Tag Manager work?
Before we start looking into how to install and take advantage of this amazing free tool, we need to understand the concept of tags, triggers, and variables.
A variable is a named placeholder for a value that in most cases will change and is used in triggers and tags. A variable can hold a single piece of information (like a page URL, domain, product ID, etc) or can hold a set of data/settings (such as GA settings variable, where you have like your GA ID, Display Ads Settings, Sample Speed Setting, etc). Also, there are instances when a variable can be used as a complex function, for example having a lookup table where we can look for a specific input that will return a specific desired output.
A trigger is a condition when a tag must fire; variables will be used to define those conditions. For example, to fire a Hotjar Tag on all pages, the trigger configuration will hold the following configuration:
Last, but not least, the final piece of the puzzle is the tag. A tag is a piece of code that must be fired on a website under certain circumstances. It is a piece of code that has a specific purpose. For example, it can be a tracking code (in most cases, it will be a prebuilt tag, e.g. Hotjar or GA) or it can be a more specific piece of code (e.g. a piece of code that can change a particular element of our website or tracks a specific interaction or when a particular resource is loaded).
Create and install your GTM container.
Similar to Google Analytics, you will need to create an account first to be able to use this free Google tool. To do this, go to Google Tag Manager’s official site and click the “Start for free” button.
Once you log in, you will be asked to create a new GTM account and a new container. Following the instructions, you will choose an account name, the country, and the container name – we suggest using your website name or your client’s site name (if you are an agency, it is best practice to ask your client to create a GTM account and then to share access with you).
As for the Target Platform field, in most cases, you’ll need to choose the Web option. Now, you should have created your account and ready to install your GTM snippet into your site’s code.
After your account creation, you will get two codes that must be added to your website. These need to be handed over to your developer to be added to your site source code. Please ask them to carefully read the instructions and to install them in the right places. (We have seen so many times, a client having issues with their recorded data because the GTM snippet was too low in the <head> or even in the <footer>.
Once these two pieces of code are pasted into your source code, you will have the liberty of tracking almost any event you want on your website. If you are using a content management system, like WordPress, you might be able to use a plugin (such as GTM4WP) to install your GTM code.
Note: Once you create your new container in GTM, you have to publish it otherwise your Preview Mode (which is the environment to test if your tag is firing properly before you are ready to push it live) would not work.
Create your first GTM tag
Now that you have added the container tag to your web pages, it’s time to create your first tag, and this will typically be the Google Analytics snippet.
From the GTM dashboard, click on ‘Add a new tag’:
You then have to select which property you wish to create a tag for. For this example we want to select Google Analytics:
After you selected your tag, we will need to create a variable – Google Analytics Settings variable, where we need to add our GA tracking ID, which can be found by going to your Analytics dashboard.
Remember to use a descriptive name for our variables, triggers, and tags. In this case, the variable name is GA Settings.
As for the trigger, we choose All Pages (which is a prebuilt trigger) because we want to track all our website pages. Our GA Tag should look like this in the end. Once you are happy with your setup, you just need to press Save and your tag is created.
Testing with GTM Preview Mode
Before we publish any new tags or changes, we need to make sure that everything is configured properly, and we have set up our triggers and variables properly. That is where the GTM Preview Mode comes in place.
Google Tag Manager Preview mode allows you to see your tags in action within your site before it goes live. To enable Google Tag Manager Debug mode, click the Preview button in the top right corner of your GTM interface.
Enter the URL which you want to test in the popup and debug. It might be the address of a homepage or it might be a specific page’s URL and then press Start.
A new browser tab will open where you will see the URL that you entered in the previous popup, while at the bottom of that page/tab, you will see a message displaying “Debugger connected”. Also, if you go back to the tagassistant.google.com tab, you will see a success message.
After you click Continue, you will see the Preview and Debug page, where you can see which tags are fired, which are not, events recorded (on the left column is a summary of recorded events) and more.
Once you know that your GA tag is firing, all you need to do is to push it live. If you make any changes in GTM, you will need to refresh the preview mode to see it on the site, so please bear that in mind.
Once you are satisfied your Google Analytics tag is firing correctly, click the Publish button on your GTM console (next to the Preview button). To double-check that it is working, head over to the Real-Time report in GA to check that your visits are being recorded. Unless you have your IP filtered out of the view you are reviewing, you should see live statistics of what page you are looking at.
Every time a container is published, a new container version of it is created. This is very useful because if a mistake occurred, you will be able to quickly restore your GTM setup to one of the previous versions (choose your desired version, click the three dots on the right-hand side and publish it).
FAQs about Google Tag Manager
#1. Is Google Tag Manager free?
Similar to Google Analytics, GTM has a Free and a Premium Plan. However, a free plan will be more than enough for small and medium businesses (we have also seen big companies with free plans because it offers them enough flexibility and “firepower” for their demands).
#2. Does GTM work only with Google products?
No, if you check the prebuilt template library, you will see a wide range of tools and/or platforms. And even if you do not find your desired tool in the template library, you can always choose to use a Custom HTML tag to deploy your piece of code.
#3 Does it store any traffic data?
No, GTM is a tag management environment and like any other tag management system, it is used just to direct your flow of traffic to the right tools. No traffic metrics are store in your GTM account.
#4. Do you require a high level of coding knowledge to use GTM?
#5. Do you still require a developer if you are using GTM?
It will depend on what exactly you want to track and most importantly what are your business/client goals. Events like button interactions, video player actions, scroll tracking, element’s appearance on the screen, etc. will be easy for you to track using GTM. But if you need some server-side data or more complex tracking (for example creating a custom DataLayer) you will need to liaise with your developer.
#6. Is it important to maintain a clean and tidy GTM container?
Yes, having a descriptive taxonomy for your tags, triggers, variables, and version is important, especially if your container has loads of tracking or multiple have to access the same account. We highly recommend having your GTM account audited every 6 to 9 months to remove or pause any unused/deprecated tags, triggers or variables this will prevent you from loading unnecessary scripts on your site.
If you are looking for Google Analytics consultants to assist you with your GTM set up, feel free to reach out to us to see how we can help!