What is Google Tag Manager (GTM) and how does it work?

Jia Ying Chang
3 min readJul 8, 2021

I’ve heard about the Google Tag Manager tool for quite a while now but never really dove into it seriously as I should.

Until I had to install it myself just a few days ago.

So, the Google Tag Manager is an online tool that helps you manage your website tags without needing to code (or even, needing to know how to code). In simpler words, you could say it’s a tag management system for your website.

The great thing about this is that you can integrate it with Google Analytics to enable a more seamless way to collect data. Because of its interoperability, you don’t even need to trouble your developer with menial amendments — you can get it done yourself!

Breakdown of GTM

A Tag Manager account represents the topmost level of organization. Typically, only one account is needed per company. The GTM then contains one or more containers, and there are specific container types that many be used for websites, Accelerated Mobile Pages (AMP like instant articles), Android apps and iOS apps.

On a deeper and technical level, GTM is made up of different components such as tags, triggers, and variables.

Websites often contain snippets of JavaScript code called “tags” that collect information like behavior data, remarketing data, ecommerce, and more. This makes it easy to send information to products like Analytics.

A tag is part of the code that you use to send signals to Google Analytics or third-party tools where you keep track of data.

Now, a trigger then is the action that signals data is needed to be collected when a tag is fired and the variables are the circumstances under which the data are collected. They are events that happen on your page. Triggers can be when a user clicks on buttons on the website, views a specific page, scrolls down to get more information, or downloads something.

Variables, on the other hand, have the capacity to send very specific information. Some variables can include the speed at which a user scrolls up or down on a page, the quantity of what they have purchased, or how long they have spent on a specific page of your site.

It helps to rule out unimportant data so you get exactly what you need when you need it.

All of this will be able to assist you with analytics for purposes such as marketing, tracking customer conversion rates, and other website analytics that are important to understanding the health of every business.

How does it work?

GTM can be put on your website pages and has its own container tags. This eliminates the need for having to place many different codes within a website. You can also use this tool to keep track of what’s happening in your mobile app.

Instead of manually tagging your code, you can use GTM to have them automatically updated on your site without doing all the hard work.

At a high level, the steps are:

  1. Create an account, or use an existing account, at tagmanager.google.com. (A new container is created by default, and you can create additional containers within each account.)
  2. Install the container on your website or mobile app.
  • For web and AMP pages: Add the container snippet as instructed by Tag Manager, and remove any existing tags.
  • For mobile apps: Use the Firebase SDK for Android or iOS.

3. Add and publish your tags.

--

--

Jia Ying Chang

Digital Marketer by trade. Currently based in Malaysia. My topics of interest: marketing, content and internet economy.