Google Tag Manager (GTM) is a free service by Google that is used to configure different analytics, conversion tracking and remarketing pixels (Universal Analytics tracking code, Facebook pixel, AdRoll pixel, etc.)

If GTM is not used all these codes and pixels should be added to the source code of the website. This approach makes it very difficult to implement the pixels (only technical team can do this), difficult to debug (tools are available only for few systems like facebook, twitter and bing) and difficult to update (source code changes are required).

GTM simplifies these processes because GTM code is added to the source code of the website only once and all the further configuration is done in web interface on

The configuration created on can be previewed, debugged and published when ready from the web interface.

The image below illustrates how GTM works:

Succinctly speaking, Google Tag Manager collects different data points (variables) from web-pages and sends them to different analytics, conversion tracking and remarketing systems (tags) when some events like clicks, form submissions, transactions, page views, etc. happen on the websites (triggers).

GTM Implementation Steps

Step 1: Create GTM container and implement it on the site

Creating GTM container is very simple. You need to go to, sign in to Tag Manager with your Google account and follow the steps there to create the container for the type of content Web.

If you have any trouble (normally you will not) with it you can check the docs here

During container creation process you should get the installation code. It looks like this:

The red placeholders contain the unique id of your GTM container.

If you have skipped this step for some reason you can always click on your GTM id link in Google Tag Manager interface ( site and get this code:

The developer should add the two code snippets on every page of the website as explained in the instructions (one snippet should be placed in <head> section and the other one in the <body>).

You can use Google Tag Assistant to check if the code is implemented correctly

Important! You should ignore "Invalid or missing account ID" error for new 7-digits containers. It is a known bug in Google Tag Assistant)

You can use to verify that GTM is installed on all the pages.

Step 2: Configure Tags in the GTM container

Before working on the configuration it makes sense to create a measurement plan or a list of events that should be sent to Google Analytics, Facebook and other systems.

Here you can find more information on what is a measurement plan and how to create it

When you have a clear idea of what you need to track you can go to and start configuring your variables, triggers and tags. Read here how to track events and how to configure an event on Read more button click with Google Tag Manager.

While working on the configuration you can run your GTM in preview mode. When you are in preview mode you will see the following panel at the bottom of your website:

This panel contains information about your tags, triggers and variables. It gets updated when new events happen on your website and new tags fire.

When in preview mode the current version of GTM is working for you but not for other users.

Step 3: Publishing the GTM container

When you are happy with your GTM configuration it is time to publish the container.

But before publishing, you should remove Google Analytics and other codes and pixels that you have configured in GTM from the source code of your website.

If you do not remove it the Google Analytics and other codes and pixels will work together with codes and pixels in GTM as on the image below:

On the image, you can see that Google Analytics and Facebook gets data from GTM and from the site directly. So each event is tracked twice. Every time someone visits a page a pageview hit is sent to Google Analytics and Facebook from GTM and from the website directly as if the user has visited the page two times.

Because of this, you will have twice as many pageviews, events and other hits as you really have along with unrealistically low bounce rate. To avoid this situation make sure you have removed Google Analytics tracking code and other pixels that are implemented in your GTM container from the website.

If you need to make any changes to your GTM configuration later you can make changes, preview and debug them as explained in step 2 and publish when you are happy with the new configuration. Every time you publish your GTM a new version of the container is created and you can republish the old configuration if you wish.

Happy tagging!

Leave a comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.