GTM (Google Tag Manager)
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.
| Feature | Description |
|---|---|
| Full name | Google Tag Manager |
| Abbreviation | GTM |
| Creator | |
| Type | tag management system |
| Cost | free |
| Interface | tagmanager.google.com |
| Supported tags | Google Analytics, Google Ads, Floodlight, third-party and custom tags |
| Container types | including 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 element | Function according to Google |
|---|---|
| Container | a set of tags, triggers, variables and settings for one website or app |
| Tag | a snippet of code that sends data, e.g. to Google Analytics or Google Ads |
| Trigger | a condition that fires a tag on a specific event |
| Variable | a 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.

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.
| Feature | Google tag (gtag.js) | Google Tag Manager |
|---|---|---|
| Deploying tags | requires writing code | without editing code |
| Supported tags | Google products only | Google, third-party and custom tags |
| Management | in the site's code | in the tagmanager.google.com interface |
| Version control | depends on how the code is managed | workspaces and container versions |
| Cost | free | free |
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.
| Feature | Web container | Server container |
|---|---|---|
| Where it runs | in the user's browser | on a server controlled by the owner |
| Sending data | from the browser to many data collection servers | from the device to one server, and onward from there |
| Data control | data goes directly to vendors | the owner decides where to pass the data |
| Clients | not present | receive 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.
How does GTM handle user consent?
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 type | What it covers according to Google |
|---|---|
| ad_storage | storage of data, such as cookies, related to advertising |
| analytics_storage | storage of data related to analytics, e.g. visit duration |
| ad_user_data | sending user data related to advertising to Google |
| ad_personalization | personalized 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”.
Let's talk growth
Send a brief or drop your contact. We'll reply within 24h.
Get a quote