Google Tag Manager for digital marketing

The problem with data analysis for digital marketing is that our systems collect and track a lot of data and this is how marketers have been using the analytics tools. And a lot of data that we need, our systems don't let us build. Especially if we use Google Analytics, which is not built for your website specifically, a vast amount of reports, metrics and dimensions are simply not relevant to calculate engagement, conversions and ROI for digital marketing. Google Analytics is installed on over 9 million website worldwide, from one person blog, to multinational companies with thousand of employees that make millions in revenue. How can GA possibly cater for all these different requirements? It's almost mission impossible. Also, web analytics is the art and science of finding insights in numbers. How can data possibly help marketers to improve their ROI and the digital presence overall?

I am not going to explain how GTM works, there are plenty of guides to read that go deep into the subject. This guide is about how to think strategically about Google Tag Manager for your digital marketing and what can be achieved with this marvellous tool. GTM is very easy to use because it has been built for marketers and marketers are not developers so the amount of technicalities and buzzwords is reduced to the minimum. Even if it's required to marketers to learn some Javascript to do complex and in-depth analysis, for most small to medium websites we can achieve what we need by simply building Tags, Triggers and DataLayers.


I share with you here some resources to get you started with GTM.


Simo Ahava Blog: Simo is one of the first GTM bloggers and Google Developer Expert. I will have the pleasure to meet him at SMXL in Milan 2018. Simo can be very technical so I would recommend reading his blog for advanced users of GTM.

Analytics Mania: this blog is simply huge and it has been created for basic and advanced users.

LunaMetrics: Troubleshooting and common issues with GTM.

Official Google Tag Manager support: this resource is somehow scarce.

AmazeeMetrics: useful GTM tags and triggers guides.


Jonathan Weber - GTM for developers: advanced resource with tips on GTM

And yes, there isn't any other book on GTM, surprisingly.

GTM for digital marketing

Since GTM became the go-to tool for data analysis in 2014, I have started using it on a daily basis for my analysis. In fact, GTM has been built solely and purposely for web data analytics and it's now integrated with so over 50+ third party tools such as Hotjar, Optimizely, VWO, WebTrends and many more.

GTM was created to compensate what Google Analytics could not do, at least not without involving a web developer.

However, GTM is not just a data analysis tool, it's much more than this.

The huge advantage for marketers is that GTM can be installed only once on the website through your CMS and then it can pass data information to Google Analytics directly in a form of a report by simply building tags within GTM, without involving the web developer anymore.

What are the tags? A tag is simply a code snippet. Google has already written those tags in advance and it's presenting them to marketers. Therefore, all we need to do is to manage them, that's why the tool is called Google Tag Manager.

This is not an analytics revolution, it's a digital marketing revolution!

We don't have to know the code and how to write snippets of code, we simply have to manage those pre-prepared by Google. This also means that we can insert as many tags as we need/ want into GTM ( and into our website) without compromising speed or performance.

So if we can install code into my website without any limit, this means that GTM is not only a web analytics tool, it's also a very powerful tool that integrates with our website and tell it to behave in a certain way and to execute some tasks, which are potentially unlimited in number.

These are some examples of what tags you can control and add into Tag Manager, some of which I have written myself into this blog:

  1. Install a new tool even if it's not integrated with GTM

  2. Manipulate DOM, including redirects

  3. Advanced Tracking

  4. SEO optimization

  5. Track dwell time

  6. Data scraping

  7. Affiliate marketing and outbound clicks tracking

  8. Engagement on the website with page scroll depth

  9. Google Analytics customisations

  10. Track incognito navigations

  11. Many more functions...

If one of the pre-cooked tags is not listed in GTM, we can build it using Custom HTML tag. This function allows you to insert any piece of code needed to execute an action on the website and trigger it whenever we need it.

Customising GTM for digital marketing

The way GTM works is that you add snippets of code directly into your website and it can modify in its entirety. This means you can modify the way you collect information, which, consequently, allows you to modify the insights you need.

What insights do we need from GTM for digital marketing?

Let's see here some examples of how GTM can be used to improve marketing.

  1. Measuring content

Content is measured often as number of visits to the page and bounce rates. But it doesn't have to be this superficial. We need more information on content measurement to be able to grasp any valuable insights from it.

We need things like:

  • Scroll depth

The depth people scrolled your blog posts to see how much of your article they read. It can be measured in percentage of page scroll: 10%, 25%, 50%, 100%. It's useful to gain insights and understand if people like what you have to write.

  • Dwell time

It's the time spent on a page after coming from search results, before going back to SERPs. Google is tracking dwell time and it's ranking pages according to how low or how high this time is. If a page records low dwell time and people go back to search, for Google it's an indication your content is not relevant.

  • Interaction

Content is made out of elements, like CTA, buttons, forms, widgets and any other element that impact interactions with the website. With GTM you can setup all these elements and read the insights to improve the way content is presented to visitors and digested by visitors.

All these elements can be customised and tracked with GTM and they are also part of your SEO strategy because Google track activity on your website that has repercussions on search.

2. Measuring website performance

Performance is measured often by conversion rates, bounce rates and ecommerce tracking. Surely, with this data we have enough numbers to make an informed decision on where to invest more money, where to AB test, where we are losing money.

But what if your website is not an ecommerce and it's a blog like mine? I don't sell anything on this website, my product is my content. You read my content and if you like it you read more, if you don't find it useful, you leave the website and never come back.

And Google Analytics is not built to measure performance of blogs that don't produce any revenue. It's built for ecommerce website.

That's when GTM comes to help, because it can be customised to read ecommerce data as blog data.

So all the data from ecommerce becomes data for blogs:

Impressions: element visibility

Product detail view: article opened

Add to cart: initial scroll

Checkout : scroll depth

Sale: article read 100%

For how to set this up I recommend the guide of Simo Ahava. It's an advanced guide and it takes some time to complete but if you want to have a report like this one, it's definitely worth it.

As you can see, all these data is not given and acquired by default from Google Analytics, this data is earned by customising the tool.


I feel I have given you lots of information on how to think strategically. This guide wasn't intended to give you a step-by-step guide on how to do something with GTM, but rather on WHAT you can achieve with GTM.

Even if you are pretty advanced with GTM, you need a more creative way to think outside the box and manipulate Google Analytics in giving you the data that you need, not the other way around.

© 2020 by Luca Tagliaferro. All rights reserved.