Google Tag Manager for SEO

, ,

Whether you want to start a blog, or you are an SEO consultant, Google Tag Manager can help you optimize and speed up some tasks.

With Google Tag Manager, SEOs have lots of freedom to add codes and execute actions that were otherwise delegated to web developers. Before Google Tag Manager was launched, in fact, SEOs normally worked with Web Developers to understand and better track actions on the website by injecting pieces of code directly into the HTML. This was normally implemented by an SEO agency because in-house staff often didn’t have this diverse skillset.

With Google Tag Manager, we now got a simplified workplace where the code is reduced to the minimum and it’s much more friendly for those, like SEOs, who are not familiar with coding.

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:

    • Install a new tool even if it’s not integrated with GTM

    • Manipulate DOM, including redirects

    • Cross-Domain and Sub Domain Tracking

    • SEO optimization

    • Tracking Button Clicks

    • Outbound clicks tracking

    • Google Analytics customizations

    • Adding FAQs Schema

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.

A few benefits of implementing GTM:

    1. You understand better your visitors’ behaviours and can report it directly into Google Analytics

    1. You can install naturally integrated tools, like Hotjar, Adometry, LinkedIn Insights, MouseFlow, Pinterest Tags and many more.

    1. You can track websites’ internal or external clicks and do more advanced implementations.

How to get started with Google Tag Manager


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.

Create an account


Head over to the GTM Sign Up page and create an account. Here are the steps:

    1. In Tag Manager, click Accounts  –> Create Account.

    1. Enter an account name and optionally indicate whether you’d like to share data anonymously with Google and others.

    1. Click Continue.

    1. Enter a descriptive container name and select the type of content: Web, AMP, Android, or iOS. If setting up a mobile container, select whether you’re using the Firebase SDK or one of the legacy SDKs.

    1. Click Create.

    1. Review the Terms of Service and click Yes if you agree to those terms.

You will have to simply install the snippet code into your website. The JavaScript code will look like this one:

<!-- Google Tag Manager -->
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
<!-- End Google Tag Manager -->

If you have the ability to access your own CMS, then you can do this by yourself. If not, you’ll have to ask your developer to implement it for you.

Verify it’s working

How do you know the code has been installed correctly?

Once code has been added to the website you can verify that it was added correctly by using a tool like Chrome’s Google Tag Assistant or by viewing the source code and seeing if the code snippets are showing up in the correct <head> and <body> sections.

What are 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.

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.

Customising GTM for SEO

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 SEO?

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

    1. Measuring content

Content is measured often as the 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.

    • Search Bounce Rate

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 the 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.


Frequently Asked Questions about Google Tag Manager for SEO

Why should I use Tag Manager for SEO?

Tagging for SEO is complex, especially large sites need to constantly update their product pages, landing pages and blog content. With Google Tag Manager you have a centralised place to organise all of your tags, perform debug in real-time, manage users permissions and have a natural integration with Google Analytics.

Why using Tag Manager for structured data?

Google Tag Manager allows you to save time because you can directly insert the necessary structured data code and trigger it for relevant tracking needs. You can first build the code separately, then insert it into a Tag and test it using Google Structured Data testing tool, before you even publish it on your website.

What variables might you need to use for certain types of structured data?

The most common SEO variables used for tagging on your website are those that isolate a single page for content tracking and performance tracking:

    • Page Path – returns the string containing the URL without your domain name (/blog). 

    • Page URL – returns the string containing the full URL (

…those that track clicks on pages:

    • Click URL – returns a string contained in the URL that has been clicked

    • Click ID – returns a string contained in the ID attribute. This is particularly helpful when tracking button clicks


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.