Free GA4 auditCheck

GTM (Google Tag Manager)

Definition

GTM (Google Tag Manager) is a free tag management system that lets you add and change tags without editing the site's code. Tags are snippets of code that, for example, send data to Google Analytics or measure conversions in Google Ads. You add two GTM code snippets to the site once, and further configuration is done in the tagmanager.google.com interface. The tags, triggers and variables collected for one website or app make up a container. GTM supports Google tags, third-party and custom tags, as well as server-side tagging.

What is Google Tag Manager?

Google Tag Manager is a tag management system, a tool for deploying tracking and marketing code in one place. According to Google Help, it lets you configure tags without changing the site's code.

FeatureDescription
Full nameGoogle Tag Manager
AbbreviationGTM
CreatorGoogle
Typetag management system
Costfree
Interfacetagmanager.google.com
Supported tagsGoogle Analytics, Google Ads, Floodlight, third-party and custom tags
Container typesincluding website, mobile app, server

Once installed, the site communicates with the Tag Manager servers. According to Google Help, a GTM container can replace all other tags hard-coded into the site or app.

Google usually recommends one GTM account per company or organization. One account can handle many websites and apps.

How does Google Tag Manager work?

Google Tag Manager works on the basis of a container that holds tags, triggers and variables. A trigger decides when a tag should fire, and a variable supplies the data it needs.

GTM elementFunction according to Google
Containera set of tags, triggers, variables and settings for one website or app
Taga snippet of code that sends data, e.g. to Google Analytics or Google Ads
Triggera condition that fires a tag on a specific event
Variablea value that simplifies and automates tag configuration
Data layer (dataLayer)an object that passes events and variable values to tags

According to Google's documentation, the data layer is an object through which the site passes information to tags. The site can send an event to it with the dataLayer.push command. GTM processes such messages one by one, in the order they are received.

An example from the documentation is sending a login event after a button is clicked. A trigger in GTM can respond to it and fire the appropriate tag.

What is Google Tag Manager?

How is GTM different from the Google tag (gtag.js)?

GTM lets you manage many tags without editing code, while the Google tag (gtag.js) requires adding code to the site. Both are free.

FeatureGoogle tag (gtag.js)Google Tag Manager
Deploying tagsrequires writing codewithout editing code
Supported tagsGoogle products onlyGoogle, third-party and custom tags
Managementin the site's codein the tagmanager.google.com interface
Version controldepends on how the code is managedworkspaces and container versions
Costfreefree

According to Google Help, gtag.js works well where the site's system does not support Tag Manager. GTM is compatible with many CMS platforms and website builders.

How are changes tested and what is server-side tagging?

Changes in GTM are checked in preview mode before publishing. According to Google Help, preview mode shows the site as if the draft version of the container had already been published.

Preview connects with the Tag Assistant tool. It lets you check which tags fired and in what order. Only after testing are the changes published on the site.

Server-side tagging is a newer way of using GTM. A server container does not run in the user's browser but on a server controlled by the site owner.

FeatureWeb containerServer container
Where it runsin the user's browseron a server controlled by the owner
Sending datafrom the browser to many data collection serversfrom the device to one server, and onward from there
Data controldata goes directly to vendorsthe owner decides where to pass the data
Clientsnot presentreceive data from devices and turn it into events

According to Google's documentation, a server container runs in a Google Cloud Platform project or in another chosen environment. Only the owner has access to the data until they decide to pass it on. Google recommends running the server on your own domain and in production mode.

Google Tag Manager has features that adjust how tags behave based on user consent. It works with Google's consent mode (Consent Mode) for this.

Consent typeWhat it covers according to Google
ad_storagestorage of data, such as cookies, related to advertising
analytics_storagestorage of data related to analytics, e.g. visit duration
ad_user_datasending user data related to advertising to Google
ad_personalizationpersonalized advertising

According to Google Help, each tag can have its own consent settings. Google tags that support consent mode adjust their behavior to the consent given on their own.

Consent management platforms (CMPs) can integrate with GTM. Templates for featured platforms are available in the Tag Manager Community Template Gallery.

Frequently asked questions

Q.Is Google Tag Manager paid?

No. According to Google Help, both Google Tag Manager and the Google tag (gtag.js) are free. Google also offers a separate version called Google Tag Manager 360. Costs can arise with server-side tagging, because the server container runs on a server, e.g. in Google Cloud Platform.

Q.How is GTM different from Google Analytics?

Google Analytics is a tool for analyzing traffic and user behavior, while GTM is a tool for deploying tags. GTM does not analyze data, it only helps send it to Google Analytics and other tools. The Google Analytics tag can be deployed through GTM without changing the site's code.

Q.Does GTM require programming knowledge?

Not always. Basic tags, e.g. Google Analytics or Google Ads, are configured in the GTM interface without writing code. According to Google Help, however, you need to add two GTM code snippets to the site once. Passing data through the data layer, in turn, requires adding dataLayer.push commands to the site's code.

Q.What is the data layer in GTM used for?

According to Google's documentation, the data layer (dataLayer) is an object through which the site passes information to tags. The data layer is used to send events, e.g. a purchase or a login, and variable values. Triggers in GTM can respond to these events and fire the appropriate tags. GTM processes messages one by one.

Q.What sources is this description based on?

The definition of GTM and the concepts of container, tag, trigger and variable come from the Google Help article “Introduction to Tag Manager”. The comparison with the Google tag is described in the article “Google Tag Manager vs. gtag.js”. The data layer is described in the Google documentation “The data layer”. Server-side tagging is explained in the documentation “An introduction to server-side tagging”. Preview mode and consent support are described in the Help articles “Preview and debug containers” and “Tag Manager consent mode support”.

Contact

Let's talk growth

Send a brief or drop your contact. We'll reply within 24h.

Get a quote
Paweł Strzelecki and Karol Majewski, co-founders of Zest