Google Tag Manager (GTM) is a free Tag Management system launched in 2012 that allows you to manage and deploy snippets of codes or tracking pixels (commonly known as tags) on your website or mobile app.
Google Tag Manager makes this possible without having to modify your site’s code each time you do so.
Because of this, integrating your site with various tools including Google Analytics, Google Ads and Hotjar is much faster and easier to manage.
Main Google Tag Manager Components
- Tags – Contain the actual code which GTM fires. Tags can be classified in 3 categories:
- built-in tags created by GTM team
- community tags created by third-party vendors
- custom tags which are created by you
- Triggers – A set of rules which specify when a particular tag should fire.
- Variables – Collect and store various information in the dataLayer which can later be used in tags, triggers or other variables. GTM has 2 type of variables:
- built-in variables
- user-defined variables
- Folders – Are used to classify and organize tags, triggers and variables.
- Templates – Intended to create tag and variable templates that you later use and configure when adding tags.
- Workspaces – Allows you to create multiple sets of changes for your container.
- Data layers – A JavaScript object that holds the value of all Google Tag Manager variables. It is used as a communication route between the site and GTM.
Benefits of using Google Tag Manager
You will notice that adding new tracking scripts and other marketing tags takes much less time than adding them manually on the site. (But only after you become familiar with how GTM works and feel relatively OK with using it.)
Other than this, here are other benefits of using Google Tag Manager:
- It’s free – There are a lot of tag management systems but most of them are paid while GTM is free.
- Lots of integrations – At the moment GTM offers 79 built in tags and 83 community templates with the number of integrations growing day by day.
- High flexibility – with so many options available when creating a trigger, you can fire a specific tag on lots of user actions such as:
- viewing a page
- reaching the comment section of a post
- Fast deployment – deployment is as easy as creating a tag and a trigger and clicking the “Publish” button.
- Ease of testing and debugging – With the help of the “Preview and Debug” console, testing and previewing tags and setups is really easy. Very few tag management systems offer this functionality.
- Version control – A new version is created every time you publish new changes in your container. And if you ever want to revert it or go back to a previous version, you can always publish older versions from your GTM.
- Large community – Google Tag Manager has a large community with an official forum and a support section where you can find answers to many questions.
Drawbacks of Using GTM
Although not as many as benefits, there still are some drawbacks of using GTM:
- The need of a developer to add the dataLayer scripts on the site – Although not all websites need the dataLayer added on the site, in some cases in order to send data from the site to GTM, you will have to add the dataLayer script directly on the site and for most website owners, this means working with a developer.
- Relatively high learning curve – If you are a beginner, publishing simple tags will not be that hard but if you want to deploy more advanced tracking and tags, you will have to spend a lot of time reading and testing. Or you can always hire a google tag manager expert to add the tracking or integration on your site.
How to Use Google Tag Manager
Now that you know what Google Tag Manager is and it’s pros and cons, we can go ahead and install it on a site and deploy our first tag.
First thing you need to do when installing GTM is to create a GTM account. For this, go to https://tagmanager.google.com, sign in and click on the “Create Account” button.
In the panel that appeared, give your account a name, choose your country, enter a name for your container (usually the domain name of your website), then choose “Web” as the target platform and click on “Create”.
On the next screen, a pop up with your GTM script will appear and you’ll have to copy the script and paste it in the header of your website, on every page.
How to Install the GTM Script on Your Site
If you are using a CMS like WordPress, you can use the “Insert Headers and Footers” plugin as it will add the script on all pages.
[Note from editor: If you are using the Genesis Framework on WordPress, you don’t need that plugin. See these directions for where to put the script code.]
How to Create and Deploy Tags
After installing the GTM script on the site, we can start creating and deploying tags. In this example, we will deploy the Google Analytics pageview tracking tag.
The first thing to do when creating a Google Analytics tag is ensuring that we have a variable which is storing our Google Analytics settings.
In our case, since we have just created the account, we do not have this variable so we will have to create it.
We do this by going to “Variables” menu, then clicking on the “New” button and from variable type, we choose “Google Analytics Settings” and in the “Tracking field” we add our Google Analytics property id.
After this, we can create the Google Analytics pageview tag. For this, in the “Tags” section of GTM, we need to click on “New” and in the pop up that will appear, we need to give our tag a descriptive name like “GA – Pageview” and choose “Google Analytics: Universal Analytics” as tag type.
Then, from the “Track type” options we select “Page view” and choose the newly created “Google Analytics Settings” as the tag settings.
What Trigger to Choose
As for the trigger, we can use the default “All pages” trigger which will fire our tag on all pages where GTM is installed. Next we click on “Save” and our tag is ready.
We now have a tag in our Google Tag Manager container but it’s not yet firing on the site as we have not published the changes.
As a best practice, before publishing a tag, it is always good to test if it’s firing correctly. We do this by clicking on the “Preview” button to enable the “Preview and Debug” mode.
With the preview and debug mode enabled, every time you go to your website you will see the “Google Tag Manager Preview” console at the bottom of your site. And in it, you will see which tags are firing and which are not.
How to Debug Google Tags That Are Not Firing
If for some reason your tag is not firing, you can click on the tag and see which firing rule was not triggered. And then later debug that trigger.
If the trigger / tag is of high complexity, you can always hire a GTM expert to perform a Google Tag manager audit for you.
After you have ensured that tags are firing correctly, you can go ahead and publish the changes to your live GTM container.
To publish the changes, we need to click on “Submit” button from the top right corner and in the pop up that will appear, we need to click on “Publish”.
After this, the Google Analytics pageview tracking tag which we created will fire on our site. And we will have the basic Google Analytics tracking added on the site.
The process of adding other tags is similar to this one. So you can integrate other tracking tools in the same way.
By doing so, you will spend less time on adding and managing scripts and pixels on your site and in turn will have more time to focus on other things like writing a blog post or promoting your site.
Peter Farrugia
Latest posts by Peter Farrugia (see all)
- What Google Tag Manager Is and How It Can Help Your Website - November 8, 2019
I really had no clue about this.It really helps thanks for sharing…
Excellent article! didn’t know tag manager could be this helpful! can’t wait to implement these guidelines for my website and hope it works. Thank you so much for sharing this information with us.
Didn’t know about the task manager. But yeah i am pretty much sure about the coding part. Tips are really very good.
Thanks for writing this.
I should try to use google tag manager. Thank you for this information.
What is the difference between Google tag manager and Google Analytics?
Google Analytics is a web tracking tool which allows you to see which pages your visitors read, their location, which traffic sources they used to arrive to the site, etc. while Google Tag Manager is a tag management system which allows you to fire different tracking scripts (like Google Analytics) on your site in a more organised and easier way.
Basically Google Analytics is the web tracking tool you install via Google Tag Manager.
Great Blog!!! I learn the whole Google Tag Manager concept here.
Thank you.
Thanks for sharing this article. as an SEO fresher it is really helpful to me.
It’s one of those “I must get around to looking at” items so the article was really helpful. Thanks Peter
Love the post because it taught me a few things about Google tags, and helped me acknowledge that I and my website are not yet ready to mess with GTM. It’s great to know where the deep water is when you haven’t yet gotten good enough to swim in it. Thanks Peter Farrugia.
Raghuram would love you to read ..Top 5 Best Animation Editing Apps For Android
great post. its really help full explain every thing very clearlly
It is very helpful and informative. Making a few changes can make a huge difference. These tips on Google Tag Manager are so practical and very simple to follow. The points mentioned are great.
Sarah currie would love you to read ..What should the baby’s bathtub look like?
Thanks Shweta! I am glad this provided clarity on what is GTM and how to use it.
I didn’t know about this at all! I should try to use google tag manager. Thank you for this information
Fanah Smith would love you to read ..Tax on Rental Income
Hi Peter, I absolutely love the fact you mentioned version control. In alot of the other guides on Google Tag Manager, they skip out on this. But version control is just so important.
I notice you didn’t mention event tracking though. It’s actually quite useful, as it allows you to track things like clicks, video engagement and form submissions. This saves so much time!
George would love you to read ..Ultimate Guide to Taobao Live Streaming: 17 Lessons From The Top 5 Streamers
Hi George! Indeed, version control is one of the best features of Google Tag Manager as it allows to go back to a previous version in case some error or miss-configuration occurred in the current version. Because of this, it is a really useful feature.
Regarding event tracking, you are absolutely right, after pageview tracking, event tracking is the best way to track user interaction with the site as with it, just like you said, we can track external link clicks, video usage, share button clicks, comment submissions, etc.
In fact there are so many ways in which event tracking can be used that I think a dedicated post might be needed for this.
Good article on Google Tag manager, very informative.
Thank you for sharing the great content.
Didn’t know about the tag manager Peter. Outstanding post, well done. Although I’m not quite sure exactly how to implement the coding. Is there perhaps a video to watch on how to use the tag manager? Thanks again for an excellent new toy to explore. Good job, well done!
Deon Christie would love you to read ..Google ranking with keyword placement
Thanks Deon!
Implementing the code on the site is different for every CMS but in case you are using WordPress, you need to copy the code from GTM and add it in the header of your website using a plugin or depending on the theme you are using, you might be able to add the code in the theme options. Maybe this article ( https://growmap.com/adding-header-code-genesis-wordpress/ ) can provide some clarity on this.
Thanks for the post. It is very helpful and informative. Making a few changes can make a huge difference. These tips on Google Tag Manager are so practical and very simple to follow. The points mentioned are great. Thanks!
Mac would love you to read ..Comment on 5 things about Forex trading you need to know! by binary options
Thank you so much for your helping! Although I am not sure about coding symstem
Linh Nguyen would love you to read ..Săn siêu phẩm bảng từ trắng có chân giá tốt tại Nội thất Lương Sơn