Si sigues mis artículos, seguro que habrás llegado a la conclusión de que soy un ferviente defensor de Google Tag Manager. He intentado evangelizar sobre esta herramienta tanto a mis clientes como en diferentes ponencias en WordCamps, como en la WordCamp de Gran Canaria 2017 , en la WordCamp Madrid 2019 o en la WordCamp Pontevedra 2019.
If you want to know my reasons for using this tool, read on:
Table of contents
First of all, what is Google Tag Manager?
En general, me encuentro con la idea que Google Tag Manager es la herramienta de Google para implementar el código de seguimiento de Google Analytics o que sirve para implementar códigos de seguimiento de otras herramientas, p.e. el pixel de Facebook, todo ello de forma sencilla y sin apenas saber de código. Aunque esto es cierto, no es lo único que se puede hacer con Google Tag Manager.
Focusing on what could be a definition: Google Tag Manager is a tool created by Google that allows us to inject code fragments (tags) in our website and define when these tags should be injected.
Examples of such labels:
- Google Analytics tracking code. (Universal and GA4).
- Google Analytics events. (Universal and GA4).
- Conversion tracking and Google Ads remarketing tags.
- Excerpt from Google Optimize.
Evidentemente, Google Tag Manager está muy bien integrado con los productos de Google, es normal, forman parte de la misma empresa. Pero no sólo es una herramienta diseñada para inyectar etiquetas de la empresa de Mountain View.
Google Tag Manager currently has 80 tag templates defined, including all three versions of Google Analytics (Classic, Universal and GA4).
Además, gracias a la comunidad de Google Tag Manager, puedes disponer de más de 300 plantillas de etiquetas distintas. Aparte de las etiquetas personalizadas que tu puedas crear.
Debido a la asociación, falsa, que existe entre Google Tag Manager y Google Analytics mucha gente puede llegar a pensar que ambas herramientas son intercambiables y se plantean si deberían usar una u otra para medir lo que ocurre en su sitio Web. Si estás en este dilema, te recomiendo que leas este artículo: «Diferencias entre Google Tag Manager y Google Analytics».
If you do not use Google Tag Manager, every time you have to include a code on your website you will have to "hardcode" it, i.e. include it directly in the code of the website on each page, or use a plugin, in the case of WordPress to include it on each page (e.g. Google Analytics tracking code) or on the pages where it should be included (e.g. Google Ads conversion tracking).
Thanks to Google Tag Manager, all the tags and their activation rules are stored in one place. Google Tag Manager is like a case where you keep everything you need: pens, pencils, a ruler...
In addition, you can test the tags before publishing them, to see if they are activated correctly depending on the trigger you define. This trigger does not necessarily have to be a page, it can be a click on a button, a scroll on a page, the acceptance, or not of cookies....
In addition, as everything is in a single point, you can easily modify the behaviour of one or more tags without having to touch the code of your website again. This, if you don't use Google Tag Manager, can become a possibly more complex and probably longer process. With Google Tag Manager it is as simple as modifying the tags, variables or triggers, testing them with the preview and publishing them at the click of a button.
Having said that, I'm going to give you the reasons why I think you should implement Google Tag Manager on your website.
Reasons to use Google Tag Manager
In case you didn't know, it's free!
I hadn't mentioned it until now, but in case you didn't know, and unlike other tag management tools, Google Tag Manager is free! You just need to have a Google account, preferably the same one you use to create your account in Google Analytics, Google Search Console, Optimize... and you will have your Google Tag Manager account at your disposal. Yes, it is true that there is a paid version in Google Analytics 360 suite, but come on, with the free version you will be more than enough.
Rapid label deployment
If you do not use Google Tag Manager and you want to implement, for example, the Google Analytics tracking code, you will need to do the following:
- Get the tracking code for your property. Ok this is easy, just go to your Google Analytics account, and copy it from the admin section.
- Decide how to implement it, do you paste it in the header.php of your theme? (very bad idea) Install a plugin? inject it via a mu-plugin? pass it to a developer?
All this takes time, and in some cases you will have additional functions that you don't need. Also, what happens if you suddenly need to implement additional event tracking? Back to square one with all of the above.
What if you suddenly had a tool that allowed you to implement these codes, do it quickly and without relying, in many cases, on a third party? Well, this tool is Google Tag Manager which allows you to inject tracking and other codes (AKA tags) and manage them from a single interface.
Thanks to Google Tag Manager you will be able to speed up processes, add new tags quickly, in many cases without having to write or copy/paste code on your website. You can also test the performance of the tags you implement before publishing them.
Single-point label management

Si no utilizas Google Tag Manager, tus etiquetas estarán dispersas en diferentes archivos, ya que irán implementados directamente en el código, en el mejor de los casos en un mu-plugin en el caso de WordPress o si no en distintos plugins. Si necesitas hacer algún cambio menor, vas a tener que buscar donde tienes ese código, para luego modificarlo.
With Google Tag Manager the process of managing and updating these changes can be done from a single point,
Possibility to test labels before implementation
Otra de las ventajas de Google Tag Manager es que puedes asegurarte que las etiquetas que estás implementando funcionan y lo hacen de forma correcta gracias al modo de depuración y vista previa.

Thanks to this Google Tag Manager functionality you will be able to see which tags are activated and which are not, as well as having additional information about the triggers that launch each tag and what data each tag has collected.
This way, you can make sure that everything is working properly before publishing them on your website, and without having to create a staging copy.
Container templates
Another reason to use Google Tag Manager, especially if you have more than one website or you are a website implementer for your clients, is the possibility of being able to export a series of tags, triggers and variables in a file and then import them into another container, creating a template that you can reuse again and again and again and again and again and...
Imagine that you have several websites, or that you are an implementer and that in your clients' websites you always include the tracking of certain events (scroll depth, form conversion, interaction measurement in an audio player...). Well, you can define it the first time, export it as a template (a json file) and then import it into other containers on other websites without having to recreate all the elements (tags, triggers and variables). However, depending on how you create the template, you may have to customise some of its elements to adapt it to the website (e.g. the Google Analytics tracking ID).
Container versions
When you publish a change to a container, a version of the container is created.
Si por alguna razón, un error, hay etiquetas que no están correctamente configuradas, lo que sea, descubres que la última versión que has publicado no funciona correctamente, aunque deberías haberla probado antes con el modo de depuración y vista previa, tranquilo, siempre puedes volver a la última versión que tenias correctamente configurada. Vamos, que GTM tiene un completo control de versiones a modo git de lo que vas haciendo.

Label templates
En la actualidad Google Tag Manager tiene definidas 80 plantillas de etiquetas, incluidas las tres versiones de Google Analytics (Classic, Universal y GA4).
This means that anyone, with no coding skills, can implement multiple tags on a website without having to go to a developer.
Además, desde 2019, gracias a la comunidad de Google Tag Manager, dispones de más de 300 plantillas de etiquetas distintas. Aparte de las que tu puedas crear.
Tight integration with GA4
After the appearance of Google Analytics 4 and the way it works, it is very clear to me that the GA + GTM combination is going to be a very powerful tool.
You may already know that GA4 is, in essence, an "event counting" tool. I recognise that this is a gross oversimplification of the tool, but in essence it is.
And, as you will see in the next point, the implementation of events is one of the specialities of Google Tag Manager. So both tools get along very, very well, it's love at first sight.
Simple implementation of event tracking
Implementing event measurement requires you to add different JavaScript codes to your website. If you use Google Tag Manager you can benefit from automatic event tracking.
By simply enabling a set of triggers in Google Tag Manager, this feature will start "listening" for interactions on our website, interactions that we can use to trigger certain tags, such as the GA4 event measurement tag.
Thanks to Google Tag Manager you can easily implement a multitude of events, from the most common, such as tracking clicks, the time spent by a user on a page, form submission... to others perhaps not so common, such as the scroll depth on a page, or clicks on the share button on any social network you have on your website...
Thanks to Google Tag Manager you will be able to easily keep track of everything that happens on your website.
Security (Script scanning by Google)
Google automatically scans all scripts you add with a custom HTML tag and if it finds anything unusual, such as a domain or url or IP used to inject malware, it will stop the execution of those tags.
Además, se puede crear políticas de seguridad que definan que etiquetas se pueden o no se pueden implementar en tu contenedor de Google Tag Manager.
User permissions
Like any other product in the Google suite. Google Tag Manager allows you to work as a team, and that obviously means that you have to enable access permissions, both to your account and to the Google Tag Manager container or containers.
In this way, you can give and control different accesses, or request that a client gives you access to their account or container in order to configure different tags, thanks to the permissions that you can assign to each user: Read, edit, publish and approve.
Not only for tracking scripts
Es algo que he comentado muchas veces, Google Tag Manager sirve para implementar fragmentos de código si, pero no solo de seguimiento.
For example, you can create an HTML tag that is injected into the page where you have a form created with CF7 and redirects to a thank you page when a user completes a form, or another tag that inserts text when a user copies text from your website and pastes it elsewhere (another website, a text document ....).
Independent of the CMS of the website
Google Tag Manager is independent of the CMS or software with which your website is built and, depending on how you have defined your tags, most of them will be able to work under another CMS.
Por ejemplo, las etiquetas básicas de medición de Google Analytics funcionan idénticamente en Prestashop, en Magento o en WordPress cuando la implementas desde Google Tag Manager. Podrías pasar de un CMS a otro sin que dejara de funcionar. Lo mismo ocurre con implementaciones más complejas, como puede ser la implementación de la ley de cookies que escribí hace tiempo.
Don't go yet
I hope I have given you arguments for you to start using Google Tag Manager, I think that if you have come this far it is more than likely.
Personally, Google Tag Manager is an option that I incorporate in almost 100% of my projects. It allows me to implement tracking tags, and others, in a short time, at least the basic one. And in the case of more particular or complex things, I always find some resource to do it.
I invite you to leave your impressions and/or doubts in the contact form and to suggest new topics that you would like me to cover in these tutorials. I will be happy to answer you by email and write in this blog.