I remember in 2013 when I was taking a postgraduate course in digital analytics at Inesdi and I discovered Google Tag Manager thanks to Eduardo Sánchez Rojo.
It took me a while to start implementing it, just to place the Google Analytics tag, at that time universal.js was being released, which was going to be the first tag of what is now called GA3. It took a bit longer to try to implement more tags from other services and a bit longer to try to implement things that had nothing to do with measurement, for example, adding snippets to WordPress through the new Google tag manager.
Grandpa's stories aside, I admit that at the time I was not very clear about the difference in certain aspects between Google Tag Manager and Google Analytics, such as the difference between events in both tools.
This is something that I still encounter today when I go to a meetup or a WordCamp: people who still don't have a clear understanding of Google Tag Manager and Google Analytics and confuse the two tools, or think that they are interchangeable. I'm going to try to clear up these doubts.
Table of contents
What is Google Analytics?
I think it will be clear to everyone what the job of Google Analytics is: to track data from a website, send and store it on the Google Analytics servers and generate reports that serve to know how users behave and analyse whether the objectives are being achieved and, if not, to take corrective actions to achieve those objectives.
To do this, by default and without doing anything more than creating a Google Analytics property and implementing the tracking code on the pages of our website, Google Analytics will offer us data such as the number of devices (people) that have visited our website in a period of time, how many pages they saw when they entered before leaving, how long they were on our website, how they arrived, etc...
This tracking is done thanks to a tracking code provided by Google Analytics when creating a new property, the famous Google Analytics snippet, which is nothing more than a JavaScript that performs the tasks mentioned above.
This fragment must be placed on the pages of our website where we want to track, normally on all public pages. Once this is done, the Google Analytics script, every time an interaction occurs on our website, will send a series of data to our property hosted on the Google Analytics servers, this is known as a hit.
If you only want to collect basic information about the behaviour of users on your website, such as page views or time spent on the website or where the visits have come from... it may be enough to put the tracking code in your website, either directly, or with a plugin or mu-plugin in the case of WordPress. But in that case you will miss a lot of interesting things.
Surely on your website there is at least one contact form, and it is the way in which, in many cases, you get leads that can then become customers of your business and you may on occasion consider doing some marketing action, such as a Google Ads campaign or publish organic content on Facebook and / or Twitter and tag the links. Wouldn't it be great to know how many leads come from each action so you can focus your efforts on those that give you the best performance?
Well, as you can imagine you can do that tracking with Google Analytics, but not with the basics, but by adding additional tags to your website that generate certain events, in this case when a user completes a form, and send the data to Google Analytics so that it can save it and show it in its reports.
And how can you do this, by adding the event tracking tag directly into the code of the website yourself, by installing a plugin that does that or by asking a developer to implement it on the website. If it's just one tag, fine, but what if you want to implement more? And don't just think about forms, think about an ecommerce, or the display of a video, or measuring the scroll in a blog, or...
If you're already thinking about this, you're going to need a lot of time to implement everything, and if you delegate it to a developer, the time in which all this can be available can be multiplied by...
This is where Google Tag Manager comes in
Thanks to Google Tag Manager you will be able to control these tags, and you will also be able to define activation rules, i.e. when the tags you need are activated.
Google Tag Manager es un gestor de etiquetas, buena noticia es gratuito!!! gracias al cual vamos a poder implementar fragmentos de código en nuestro sitio web
For example, thanks to Google Tag Manager we can implement the Google Analytics tracking code, the Facebook pixel, the Google Ads conversion tracking and remarketing scripts...
And not only measurement codes, we can also, for example, implement the cookie consent mode or the script that allows us to redirect a CF7 form to a thank you page.
A first message: Google Tag Manager does not replace Google Analytics, it complements it, helping us to easily implement the codes and define the rules for their activation, instead of having to implement them "bare-bones" on the website, as well as being able to maintain them from a single point, the Google Tag Manager account, which is like a case where you can keep everything you need: pens, pens, a ruler...
In addition, thanks to Google Tag Manager you can test your tags before putting them into production so you can be sure that you are doing what you want them to do and not something else. Or modify a tag or the way it works. And all this without having to modify a single line of code, simply by editing the tags in Google Tag Manager and publishing the changes in one click.
Google Tag Manager currently has 80 tag templates defined, including all three versions of Google Analytics (Classic, Universal and GA4). In addition, thanks to the Google Tag Manager community, you can have more than 300 different tag templates. In addition to the ones you can create yourself.
So how does Google Analytics differ from Google Tag Manager?
Google Analytics is a tool that collects data and displays them in reports, while Google Tag Manager does not have, nor will have, any defined report. Its function, among others, is to send data to the different marketing tools.
Google Tag Manager is a tag manager, it allows you to create and manage, among others, JavaScript tracking codes, but it also allows you to "inject" css or php code into your website on the pages of your choice.
If you don't want to use Google Tag Manager to manage your website's tags, you don't have to. You can add any tracking code or other type of code by hardcoding it into your website, but you will lose flexibility.
I have already mentioned that Google Analytics is a tag. When you create a Google Analytics property in the administration section you are shown instructions on how to implement it, as well as the code for the tag itself.
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-PF02255RMX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX');
</script>
You can implement this script either by including it in the code of your website or with a plugin or mu-plugin. You can see the latter option in one of the first articles on this website where I talked about how to add the Google Analytics tag to WordPress.
In the same article you have the instructions to add the Google Analytics tag from Google Tag Manager thanks to the "standard" tag. In the video you can see how to implement the Universal Analytics tag, but don't worry, for GA4 the process is similar. You can see how to do it in this article: "How to install GA4 with Google Tag Manager".

Thanks to this tag, you will be able to track basic page views. In addition, if you have enabled Enhanced Measurement from GA4 you will be able to track other events.
You have convinced me, how do I migrate to Google Tag Manager?
If you already have Google Analytics on your website, either in the code or via a plugin, and I have convinced you to implement Google Analytics via Google Tag Manager, just keep in mind a couple of things to avoid making a mess.
- Remove the Google Analytics tracking script or deactivate the plugin / mu-plugin that implements this script.
- Add the Google Tag Manager container code to all the pages of your site, don't know how? In the following article I explain how to do it easily in WordPress: "How to add Google Tag Manager code to WordPress".
- Activate Google Analytics tags from the Google Tag Manager tag manager. You can see how in this other article: "How to install GA4 with Google Tag Manager".
- Check with Google Tag Manager's preview mode that the tags are loaded correctly and with GA4's DebugView that the events are collected,
And don't worry, your historical data will not be lost, it will still be there.
Don't go yet
By way of summary, if I know I could have put this and saved all of the above, but I think, I hope, that it has helped you to better understand the differences between Google Tag Manager and Google Analytics:
- Google Analytics is a measurement and analysis tool that will provide you with reports on what is happening on your website,
- Google Tag Manager is a tool that will activate your tracking codes according to the rules you specify.
- You can implement Google Analytics directly on your website.
- You canimplement Google Tag Manager on your website and use it to activate Google Analytics code, among others.
And if we compare Google Analytics and Google Tag Manager:
- Google Tag Manager is not a replacement for Google Analytics. But it will help you easily implement the Analytics tracking code, the snippets that allow you to send events to Google Analytics and the rules for when each tag should be triggered.
- Google Tag Manager can exist without Google Analytics and vice versa. You can always implement Google Analytics tags (page and event tracking) in the code of your website and use Google Tag Manager to add other codes, such as Google Adsi measurement or remarketing or Facebook pixel. You can even implement Google Analytics page view tracking code on the website and event tracking in Google Tag Manager.
- Google Tag Manager es un intermediario entre el sitio Web y las herramientas de medición que te va a permitir realizar implementaciones de estos códigos de manera más rápida y sencilla
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.