# Google Tag Manager

> Google Tag Manager lets you add and update tags on your site without editing site code each time. What it does, how the data layer fits in, and common mistakes.

Canonical: https://scaplet.com/glossary/google-tag-manager

Glossary Google Glossary · Measurement

Google Tag Manager lets you add and update tags on your site without editing site code each time. What it does, how the data layer fits in, and common mistakes.

3 min

read

4

sources

Oct 24, 2026

updated

Scaplet Editorial Team

author

In one line

Google Tag Manager (GTM) is a tag management system that lets you configure and deploy tags on your website or mobile app from a web interface. You add the container code and a data layer to your pages, then manage tags, triggers, and variables in Tag Manager, preview your changes, and publish them as a version.

30-second check

## Is this costing your site traffic?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?

Summarize this page with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fgoogle-tag-manager%20(%22Google%20Tag%20Manager%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Claude](https://claude.ai/new?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fgoogle-tag-manager%20(%22Google%20Tag%20Manager%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Perplexity](https://www.perplexity.ai/search?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fgoogle-tag-manager%20(%22Google%20Tag%20Manager%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [![Google](/logos/ai/google-color.svg)AI Mode](https://www.google.com/search?udm=50&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fgoogle-tag-manager%20(%22Google%20Tag%20Manager%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

On this page

## 5 parts, 3 minutes.

1. [What GTM does 01](#what-gtm-does)
2. [The building blocks 02](#the-building-blocks)
3. [Install on a web page and publish 03](#install-on-a-web-page-and-publish)
4. [Data layer timing 04](#data-layer-timing)
5. [Common mistakes 05](#common-mistakes)

_01_Explained

## What GTM does

Google describes Tag Manager as "a tag management system that lets you configure and deploy tags on your website or mobile app, from an easy-to-use web interface." Without editing your site code, you can use it to add and update Google Ads, [Google Analytics](/glossary/google-analytics-4), Floodlight, and third-party tags.

Tag Manager delivers tags. The tags send data to tools such as [Google Analytics 4](/glossary/google-analytics-4). Google lists tag organization, version control, support for multiple tag types, community-developed tag templates, enterprise collaboration, and security features among the reasons to use it.

_02_At a glance

## The building blocks

Piece

### Account and container

What it is

Google's API documentation says each Account can have one or more Containers, and each Container can have one or more Workspaces

Piece

### Workspace

What it is

Where you change a container's tags, triggers, variables, and folders. Changes can be previewed and published as a Version

Piece

### Tag

What it is

The code or configuration that sends data to a tool, such as a Google Analytics tag

Piece

### Trigger

What it is

The condition that fires a tag, for example an event such as a button click or the value of a variable

Piece

### Variable

What it is

A value passed to tags and triggers, often from the [data layer](/glossary/data-layer)

A common pattern: one container per site, a Google Analytics tag that fires on all pages, and separate tags with click or form triggers for the actions you want measured.

_03_How it works

## Install on a web page and publish

1. 1

### Create the account and container

Create an account and a web container in the Tag Manager interface. The container ID has the form `GTM-XXXXXX`.
2. 2

### Create the data layer, then add the container code

For web page installations Google says you must create a data layer. Establish it before the Tag Manager [snippet](/glossary/snippet) loads, as in the code below.
3. 3

### Add a tag and a trigger

In a workspace, add a tag and attach the trigger that decides when it fires.
4. 4

### Preview, then publish

Preview your workspace changes before they go live. Publishing creates a Version.

Data layer before the container snippet (from Google's data layer guide)

```
<script> window.dataLayer = window.dataLayer || []; </script> <!-- Google Tag Manager --> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-XXXXXX');</script> <!-- End Google Tag Manager -->
```

Google's gtag.js guide recommends using Tag Manager to set up and deploy tags. Deploy each Google tag one way, then use preview to confirm it fires where you expect.

_04_Explained

## Data layer timing

Tag Manager processes data layer messages one at a time, in the order received. A `gtag()` or `dataLayer.push()` call made by page code, a custom template, or a Custom HTML tag is queued behind pending messages, so Google says updated data layer values are not guaranteed to be available for the next event. Add an event name to the pushed message and listen for it with a Custom Event trigger.

Google also says not to use Custom HTML tags to deploy gtag.js-based code. Use Tag Manager's native tag templates instead.

_05_Checklist

## Common mistakes

1. 01 Publishing without previewing, so triggers fire on the wrong pages or not at all.
2. 02 Reading data layer values in the same event that sets them, instead of using a Custom Event trigger.
3. 03 Leaving vague version names. Describe what changed so a rollback is not guesswork.
4. 04 Letting old tags pile up. Remove tags for tools you no longer use.
5. 05 Treating Tag Manager as a performance fix. Every tag is still code the browser runs, so more tags means more work on the page.

Sources · 4

## Every fact, linked and dated.

Official docs first. The date is when we last opened each page.

- google.com

1. 01 [About Google Tag Manager - Google for Developers](https://developers.google.com/tag-platform/tag-manager) developers.google.com · checked 2026-10-24
2. 02 [The data layer - Google for Developers](https://developers.google.com/tag-platform/tag-manager/datalayer) developers.google.com · checked 2026-10-24
3. 03 [Google Tag Manager API overview](https://developers.google.com/tag-platform/tag-manager/api/v2) developers.google.com · checked 2026-10-24
4. 04 [Set up the Google tag with gtag.js](https://developers.google.com/tag-platform/gtagjs) developers.google.com · checked 2026-10-24

Questions

## Asked a lot.

4 questions people ask next, answered from the sources on this page.

_01_ Do I need a developer to use Tag Manager?

Google says Tag Manager lets you add and update tags without editing your site code. A web installation still needs the container snippet and a data layer on the page, and custom data layer work can need developer help.

_02_ Is Google Tag Manager the same as Google Analytics?

No. Tag Manager delivers tags. Google Analytics is one of the tools those tags can send data to.

_03_ Can I manage Tag Manager with code?

Yes. The Google Tag Manager API gives an authorized user access to configuration data, including accounts, containers, tags, triggers, variables, and user permissions.

_04_ What is server-side tagging?

Google says [Server-Side Tagging](/glossary/server-side-tagging) lets you move tag code off your website or app and into the Cloud, and that it can help improve performance and security while serving dependent assets from your own domain.

## Keep learning

[All glossary](/glossary)

[Learn Attribution Measurement](/glossary/attribution) [Related Conversion tracking Measurement](/glossary/conversion-tracking) [Read next Google Analytics 4 Measurement](/glossary/google-analytics-4) [Do Run a free site audit Free, about two minutes](/site-audit)

Nearby in glossary
[Google Search Console](/glossary/google-search-console) [Google Suggest](/glossary/google-suggest) [Gray hat SEO](/glossary/gray-hat-seo) [Grounding](/glossary/grounding)

More in Measurement
[Data thresholds](/glossary/data-thresholds) [Data-driven attribution](/glossary/data-driven-attribution) [Default channel group](/glossary/default-channel-group) [Direct traffic](/glossary/direct-traffic) [Dwell time](/glossary/dwell-time) [Engagement rate](/glossary/engagement-rate) [GA4 audiences](/glossary/ga4-audiences) [GA4 DebugView](/glossary/ga4-debugview) [GA4 events](/glossary/ga4-events) [GA4 Explorations](/glossary/ga4-explorations) [GA4 sessions](/glossary/ga4-sessions) [Google Analytics 4](/glossary/google-analytics-4) [Google Tag Manager](/glossary/google-tag-manager) [Impressions](/glossary/impressions) [Internal search](/glossary/internal-search) [Key events](/glossary/key-events) [Last touch attribution](/glossary/last-touch-attribution) [Lead scoring](/glossary/lead-scoring) [Magic number (SaaS)](/glossary/magic-number) [Measurement Protocol](/glossary/measurement-protocol) [MRR (monthly recurring revenue)](/glossary/mrr) [Multivariate testing](/glossary/multivariate-testing) [Net Promoter Score (NPS)](/glossary/nps) [Net revenue retention (NRR)](/glossary/net-revenue-retention)

Terms on this page
[Google Analytics 4](/glossary/google-analytics-4) [Data layer](/glossary/data-layer) [Search snippet](/glossary/snippet) [Server-side tagging](/glossary/server-side-tagging)

Free · 2 minutes

## Know the term. _Now check your site._

The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **+212%** organic clicks in 90 days Ledgerly
