Google Tag Manager: A Step-By-Step Guide

Google Tag Manager

[Last Updated on December 2013]

The more useful and relevant your site becomes, the worse it may actually perform. This happens because websites are continuously adding tags to enhance their tracking, optimization or other functionality; this ends up crowding pages with third party tags and may slower the website.

For this reason, the Google Tag Manager, a free solution for tag management, is very welcomed, especially by Marketers. In the past, everything was controlled by webmasters, including website tracking, which was highly technical as it required dealing with log files. Then, in 2005, Google made the JavaScript method widely available with Google Analytics, but it still required a technical integration by webmasters as it required adding codes to the website.

With Google Tag Manager, marketers will be able to add, edit or remove marketing and measurement tags without the intervention of webmasters. This will speed the process from the marketing perspective and will free webmasters to work on other important tasks.

Google Tag Manager Structure - Accounts, Containers & Tags

The structure used by Google Tag Manager is very similar to the one used by Google Analytics. In Analytics we have accounts that can contain several Web Properties (usually one per website) which can contain several profiles. Below is the hierarchy used by Google Tag Manager:

Accounts

The top-most level of organization. Typically, only one account is needed per company. Tags for all the company’s websites can be managed from this account by creating new containers. In order to create an account visit google.com/tagmanager and signup for the product.

To create additional accounts, sign in to your existing account, click on "Accounts List" (found on the drop-down on the top-left corner of the page) and click on the "New Account" button shown in the screenshot below.

Adding an account to Google Tag Manager

You will be asked to fill in the account name, whether it will be used for We of Mobile Apps, the container name, the time zone and the domains that will be used. As a best practice, the account name should always be the name of the company while the container name should always be the website using this container.

Containers

A container holds all the tags for a specific website; as mentioned above it should be named after the website it is being used for. To create a new container select an account and click on the "New Container" button on the top-right corner of the page as shown in the screenshot below.

Creating a new Container on Google Tag Manager

You will need to add the container name, time zone and domain.

Tags

Once you create a container, you can start creating tags for your website. Google provides a few templates for its own tags, but it also allows custom tags to be used. Below are some of the tags supported by the tool, for an explanation about each of them, as well as a complete list, check this help center article:

  • AdWords Conversion Tracking
  • DoubleClick Floodlight Counter
  • DoubleClick Floodlight Sales
  • Universal Analytics
  • GDN Remarketing
  • Custom Image Tags
  • Custom HTML Tags
  • In order to add a tag to a container, navigate to the container, choose the tags section and click on the "New Tag" button on the top-right corner of your screen. See indications in screenshot below:

    Adding tags to Google Tag Manager

    You will then reach the tag page. In this page you will be able to chose between the different tag types described above. As I wrote above, Google created templates for its own tags in order to minimize the possibility of errors.

    Once you decide which tag to add, you will be prompted with a few details to fill for each tag type: e.g. Conversion ID and Conversion Label for AdWords Conversion Tracking or Web Property ID, Cookie Path and Track Type for Google Analytics. You will also be able to click on "Add Rule to Fire Tag" as seen below:

    Tag Manager rule

    The rule will define the conditions under which the tag is fired. For tags that should appear in all pages of the website (like Google Analytics) a rule can be created to URLs that match a Regular Expression ".*" Another common usage would be to add tags to the conversion page only, so you might want to add a rule for an URL that equals the page address. For more information on rules and macros check this help article.

    Publishing & Versions

    Once tags are added to a container they are not automatically published, they must be "manually" published. Publishing is always linked to a container version, which is a snapshot of the container that can be made at any time.

    If you click on the "Versions" left navigation menu, you can check versions by clicking on the numbers; it will take you to a page summarizing all tags included in this version and the rules applied to them. This is an excellent way to keep the tags organized for troubleshooting tagging problems.

    Tag Manager versions

    Users & Permissions

    Users are added to accounts and, by default, have "No access" to all containers in the account. For each container, there are four types of user access:

    1. No access: user does not see the container listed in the account.
    2. View only: user sees the container listed and may browse the tags, rules, and macros in the container, but cannot edit them.
    3. View and Edit: user may add and edit tags, rules, and macros in the container.
    4. View, Edit, Delete and Publish: user may add, edit, and delete tags, rules, and macros in the container as well as publish changes to the live site.
      1. In order to manage user access see the indications in the screenshot below.

        Google Tag Manager user access

        Closing Thoughts

        In summary, the Google Tag Manager is an important tool for online businesses, it makes marketing and measurement easier and more secure. In the words of Google:

        "Google Tag Manager allows you to conveniently manage tags (such as tracking and marketing optimization tags) on your site. You can add and update AdWords, Google Analytics, Floodlight and non-Google tags from the Google Tag Manager user interface instead of editing site code. This reduces errors, frees you from having to involve a webmaster, and allows you to quickly deploy tags on your site."

        Related Tag Management Content

        1. Tag Management Systems and Website Innovation
        2. The Inevitability of the Tag Management System
        3. Tag Management Systems by Josh Manion (Ensighten) [video]

Subscribe To Our Newsletter For Monthly Updates



Your e-mail will be kept private

Ileane | October 2012

Hi Daniel, thanks for introducing this tool. I haven't heard about it anywhere else. My friend started a new WordPress blog this weekend and I told him I'd add the tags for Google Webmasters tools, Bing, Google Analytics, etc. so I'll get a chance to make use of this right away.

Star | October 2012

Great overview! (And out faster than anyone else in the industry.)

Star | October 2012

Do you think any of the tag mgmt tools already out there will survive?

vincent | October 2012

I do not really see the benefit? most 'tags' are placed once and never change. I never change my google analytics script? am I missing something?

Anonymous | October 2013

a perfect world. no, you don't need this. However it will be smarter to use this if you have the following or want to ensure you don't have a problem like this when:

-Someone from your company leaves and took the GA login with them (death of the owner and not documented), forcing you to restart the stats.
-multiple footers and don't proper use INCLUDES when it should have
-don't have full control of the website and requires you to submit a request just to change something simple.
-or GA has a new property. When GA released Universal Analytics, it meant developer to change the GA code.

Amin Shawki | October 2012

Great article about Google Tag Manager, and thanks for the screenshots! We're excited for this new marketing tool as well. The problem we noticed is the hassle it can be spending a lot of time searching for those tags in your website's code, especially as a marketer. So we created a tool that finds tags in your website's code and generates a report of all tag locations for you. TagInspector.com will save so much time automatically pulling tag locations for you and sending you a report, definitely worth a look.

Mark | October 2012

Interesting,

one question, does it have to go before the body tag?

I already have various tags on my site and they are all part of my footer sections, that form part of various templates.

Having to put them now on every page, or at least on the templates for different pages seems like unnecessary work.

Rudra | August 2013

Mark,
It has nothing to do with those tags. I think you are talking about Meta tags right?
Look at the video above :)

Rudra

Atlos | October 2012

Will this work for the webmaster tool snippet as well instead of loading it up to your root?

James | October 2012

Hi,

Have you actually had any success using GTM with BingAds conversion code?

We've tried but haven't got it to work and have read on the GTM product forum that the code needs modifying but the guy isn't letting on his trick. Any ideas welcome, I have been scouring blogs for examples of someone who has done it but I'm yet to find one.

Cheers
James

Luis Nieto | December 2012

Very good tool for marketers. This is going to make my life so much!

NickMiller | December 2012

This is what I'm looking for. This is a very detailed overview. Btw, why do you think the tags must be manually published after adding to a container?

Jason | March 2013

I've never heard about this tag manager before, but i am sure it'll help marketers.

Tony | March 2013

Thanks for this overview Daniel, Does GTM have a restriction on the tags that can be used or can completely bespoke tags be created and added. For example adding a tag from a third party SAAS supplier that will help the website owner personalise their site or add a recommendations engine?

Anonymous | August 2013

Great tool

Lee Kennedy | August 2013

Hi Daniel. Thanks so much for such an in-depth post! I know you wrote this in October, but this post is #1 for some Tag Manager queries :). I am just now starting to implement Tag Manager for a bunch of clients, and am really looking forward to the ease and flexibility of it.

There is one thing I think you forgot to mention that was really helpful for me: The Preview/Debug functionality. When you're about ready to publish a container, you can select Preview/Debug and it will bring up the website with a frame at the bottom of your screen that monitors what tags are being fired. For example, I was testing some GA Events that fired based on a dynamic Label (which is awesome that TM lets you do that!) and could verify that everything worked before pushing the code live. Might be a useful addition. Cheers!

Eric Prado | August 2013

The Google Tag Manager is made easier with this video. I like how the editor and creator of this video turn it to be step-by-step. I am so excited with this tool.

Samual Minor | August 2013

As a marketer, my work has become easier than before because with this tool, I can edit tags more easily to save time. Thanks! One of the helpful tools.

Rauol | August 2013

Would these tags be useful for our not for profit website or is it mostly for E-commerce
R

khaled | October 2013

hi, how can i put the tag manager snippet to my wordpress based site. i meant every single page?

Susan | October 2013

Hi Daniel,
Thanks for the systematic guide. Quite helpful.
Cheers

Kevin Right | October 2013

Thank you a lot for the tag manager snippet. Now it is great for my web-site.

Kevin Right | October 2013

Great guide! Thanks a lot for your efforts.

Ramu Sinha | November 2013

Thanks for putting all the information together i have wordpress blog and am trying to implement tag manager at my blog as per your given instructions but it is showing some fatal error. It will be great if you can just create some tutorial video series. I have heard in forums even developers are sweating to implement GTM.

savya | November 2013

I think one video is posted in that regards. You can see them ramu. Tag manager is very essential these days. Thanks for writing it down.

Ciaran | November 2013

Thanks for the article. I'm unsure how to manage international sub-domains. Should I have a new container per international sub-domain or just all in the one container?

Jackson | November 2013

This is a time saver for an Multi National Companies where different activities are undertaken by different departments. Time that make took weeks can be fixed in matter of seconds.
Usually for a small business owner or web developer it does not have much influence in the implementation of Google Tag Manager.. Thanks Daniel for the post. Its a good eye opener in the subject

Anonymous | November 2013

Nice post for me. But I would like to ask that after setting up this, where can I see data in Google Analytics?

For e.g. How many visitors click on submit button?
From which page a visitor submit form (existed on all pages of website)?

Can I the above mentioned type details in Google Analytics?

Anonymous | December 2013

Google tag manager can stop the form submission functionality any way ?

Jack Leo | December 2013

I want to use the auto event tracking with GTM. While setting up GTM container script for my classic Google analytics, I need to delete the classic GA script code in my website? Once we remove the old classic GA script code from website, Is it working (Can we use the classic Google analytic account)?

JC | January 2014

Clarification on this would be useful also. Do we delete all other GA code or keep as is? What if it doesn't work the way we need it to, such as bing ad tracking issues? Sounds like dev work is still required.

Anonymous | January 2014

Well as a developer I've been trying to get Tag Manager firing and to see results returned in analytics, so far a real pain. Then there is the 'Data Layer' good luck with a marketer getting there head round that. So far it has been dev team having to set this up, I can't see any marketer even once working being able to use it and still relying on us. So then what has it achieved. Google are continually innovating but to the end consumer it is just a mess, Google analytics, Tag manager, Web master tools, and more, all working in slightly different ways, using different wording. It is soup. Certainly not a simple one click done in 5 process.

Anonymous | April 2014

I agree. There are a few great options in Tag Manager that are easy to implement, but as soon as the Data Layer is brought into the mix, it becomes a developers job again :-)

James | January 2014

How would Google tag manager helpful, If my website is simple?

Anonymous | March 2014

I would like to ask that after setting up this, where can I see data in Google Analytics?

For e.g. How many visitors click on submit button?
From which page a visitor submit form (existed on all pages of website)?

Manish | March 2014

Hi,

i am not getting what actual work GTM, if i set my site home page where can i get visitor and such information like google analytics. what is the difference between Analytics and Webmaster.

Thanks,
Manish

Damien | March 2014

Thanks Daniel, so once the code is added to the site, it doesn't need to be changed no matter what tags you edit and add/remove. Is that right?

Daniel Waisberg | March 2014

Yes, that's right.

Anonymous | April 2014

Hi Daniel,
Great post, just wondering how do I refer to the data in a Tag which I have already pushed through using "Data Layer" on the page.
I know it has something to do with the macros.
I have googled this through several angles but not been able to find a definite answer.

Daniel Waisberg | April 2014
manjeet | May 2014

while inserting the google tag manager in my source file..should i keep the old classic GA code in the source page...or i should remove it..???Thanks

Kitar Nattiya H | May 2014

I have the same question!

My website has been manually inserted GA code before .

So what happen if I use Tag Manager? Will the original GA code be automatically deleted? Meaning all the code will be in Tag Manger code set in section?

If not, will effect how GA collect data?

Thank you!

John Borillo | July 2014

This has been very helpful. My client has me working on the customer service part of our campaign and Google Tag Manager is what we're using. However, this is the first article I've found that has been quite easy to understand.

Dave | July 2014

A lot of people asking about if they need to remove old GA code and never getting an answer. The Answer is YES, you remove all Google GA or Universal snippets from your website including conversion or remarketing tags. GTM generates a new code snippet at the Container level (each website or app) which replaces all of the old scripts.

You then create an Analytics Tag, a Remarketing Tag, Conversion tags, events tags etc., all from one interface. It's one reason why GTM is way ahead because it does it all.
Cheers
Dave

Post new comment
The content of this field is kept private and will not be shown publicly.
Refresh Type the characters you see in this picture.
Type the characters you see in the picture; if you can't read them, submit the form and a new image will be generated. Not case sensitive.  Switch to audio verification.
Online Behavior © 2012