Free auditStart free
GlossaryGlossary · Measurement

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.

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 withChatGPTClaudePerplexityGoogleAI Mode
01Explained

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, Floodlight, and third-party tags.

Tag Manager delivers tags. The tags send data to tools such as 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.

03How 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 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 -->
04Explained

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.

05Checklist

Common mistakes

  1. 01Publishing without previewing, so triggers fire on the wrong pages or not at all.
  2. 02Reading data layer values in the same event that sets them, instead of using a Custom Event trigger.
  3. 03Leaving vague version names. Describe what changed so a rollback is not guesswork.
  4. 04Letting old tags pile up. Remove tags for tools you no longer use.
  5. 05Treating 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. 01About Google Tag Manager - Google for Developersdevelopers.google.com · checked 2026-10-24
  2. 02The data layer - Google for Developersdevelopers.google.com · checked 2026-10-24
  3. 03Google Tag Manager API overviewdevelopers.google.com · checked 2026-10-24
  4. 04Set up the Google tag with gtag.jsdevelopers.google.com · checked 2026-10-24
Questions

Asked a lot.

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

01Do 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.

02Is 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.

03Can 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.

04What is server-side tagging?

Google says 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.

Free · 2 minutes

Know the term. Now check your site.

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

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • +212% organic clicks in 90 days Ledgerly