LevelUpWith

Explore / Trustworthy Tracking with Google Tag Manager / Lesson 2

Lesson 2: Accounts, Containers, Workspaces and Versions

Set up a GTM account and web container for a test site, install the container snippet, and learn how workspaces, versions and publishing let you make changes safely and roll them back.

Free to read, no account needed. Part of Trustworthy Tracking with Google Tag Manager.

By the end of this level you'll be able to

  • Create an account and web container and install both parts of the container snippet on a test site
  • Explain the difference between a GTM-XXXX container ID and a product-specific ID such as G-XXXX, given the July 2026 change that makes the container ID decide what tags are allowed (release notes read 20 October 2026)
  • Create a workspace, publish a named and described version, then roll back to an earlier version

The filing cabinet and the drawer

In Level 1 we saw that numbers go wrong when tracking code is scattered across a site with nobody in charge of it. Google Tag Manager (GTM) gives that code one home. Before you add a single tag, you need to know how that home is laid out. Picture a filing cabinet:

  • Account: the cabinet. Usually one per company, for example Acme Ltd.
  • Container: a drawer for one website or app, for example test.acme.co.uk (Web). Its ID looks like GTM-ABC1234.
  • Workspace: a desk where you lay out draft changes before anyone sees them.
  • Version: a dated photocopy of the drawer's whole contents. Publishing puts one version live.

The last two are the safety net. Nothing you do in a workspace reaches visitors until you publish, and every publish leaves a version you can go back to.

Walkthrough 1: Create an account and web container

  1. Go to tagmanager.google.com and sign in.
  2. On the Accounts tab, click Create Account.
  3. Account Setup: enter the company name and country.
  4. Container Setup: name the container after the site's top-level URL, such as test.acme.co.uk, and choose Web.
  5. Click Create and accept the Terms of Service.

GTM then shows you the two-part install code. Copy both parts.

Walkthrough 2: Install both parts of the snippet

Both parts carry your container ID. Part 1 goes as high in the <head> as possible. Part 2 goes immediately after the opening <body> tag.

<!DOCTYPE html>
<html>
<head>
  <!-- Google Tag Manager: PART 1, first thing in <head> -->
  <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-ABC1234');</script>
  <!-- End Google Tag Manager -->
  <!-- Placing it high means GTM starts loading early, so fewer visits slip past untracked -->
  <title>Acme test site</title>
</head>
<body>
  <!-- Google Tag Manager (noscript): PART 2, straight after <body> -->
  <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-ABC1234"
  height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
  <!-- Fallback for browsers with JavaScript turned off -->
  <h1>Hello</h1>
</body>
</html>

If the site runs on a CMS such as WordPress or Shopify, use the platform's GTM integration or theme settings rather than pasting the code into every page.

Gotcha: put the snippet on every page, once. If a page template is missed, that page goes dark. If the snippet appears twice, every tag fires twice and your conversions double. We'll come back to both mistakes in later levels.

GTM-XXXX versus G-XXXX: which ID loads the container matters

You'll see several kinds of ID around Google's tools:

ID What it is
GTM-ABC1234 Your Tag Manager container
G-XXXXXXX A GA4 data stream (Google tag)
AW-XXXXXXX A Google Ads account (Google tag)

The distinction now has real consequences. The Tag Manager release notes (read 20 October 2026) record a change dated 9 July 2026. Some sites were loading their GTM container through the Google tag's paths (/gtag/js or /gtag/destination) rather than the normal gtm.js. Google treats those as unsupported installation paths. From that date, the ID used to load the container decides what is allowed:

  • Loaded with a GTM- ID: no restrictions.
  • Loaded with a product ID such as G- or AW-: only Google-provided tags and variables run. Custom HTML and third-party templates, such as a Meta pixel, will not run.

Google says it emailed administrators of significantly affected containers. On your own sites, open DevTools → Network, filter for googletagmanager, and check that the request reads gtm.js?id=GTM-.... If you find a G- ID loading a container that holds custom tags, switch the site template to the GTM- snippet. Afterwards, look for duplicate hits.

Walkthrough 3: Workspace → version → publish → roll back

Create a workspace. Every container starts with a Default Workspace. To start a separate one, click the current workspace name at the top left, then + to add one, and name it after the job, for example ws-cookie-test. Standard (free) GTM allows three workspaces at once: the default plus two more. Tag Manager 360 has no limit.

Make a change and preview it. Add any small test item. Then click Preview, which opens Tag Assistant, and enter your test site's URL. Check that Tag Assistant shows your GTM- container as connected.

Publish a named version. Click Submit → Publish and Create Version, then fill in a real name and description:

Version name:        v2 - test tag added for snippet check
Version description: Adds a test tag to confirm the container loads on
                     test.acme.co.uk. Requested by David, 20 Oct 2026.
                     Safe to remove.

GTM can now suggest a version name and description for you. Treat the suggestion as a first draft and add the why that only you know.

Best practice: "Version 7" with no description tells nobody anything six months later. When numbers jump, the first question is "what changed and when?", and good version notes answer it in seconds.

Roll back. Suppose v2 causes trouble. Go to Versions, open the Actions menu beside the last good version, and choose Set as Latest Version. This replaces your draft with that version's contents. It does not change the live site, so publish again and give the publish a name too, such as v3 - rollback to v1 (v2 broke checkout).

Gotcha: once one workspace publishes, every other workspace has to update to take in the new version before it can publish itself. GTM flags any conflicts and helps you resolve them.

Verify it

  • Tag Assistant preview connects and shows GTM-ABC1234.
  • The Network tab shows gtm.js?id=GTM-ABC1234 on every page template.
  • The Versions list shows your named versions in order, with the rollback version marked as live.

Key takeaways

  • Account = company, container = one site (GTM- ID), workspace = draft desk, version = snapshot.
  • Install part 1 high in <head> and part 2 straight after <body>, on every page, exactly once.
  • Since 9 July 2026, a container loaded with a G- or AW- ID runs only Google tags. Load it with the GTM- ID.
  • Nothing goes live until you publish. Give every version a clear name and description.
  • To roll back, use Set as Latest Version and then publish.

A 6-question knowledge check follows this lesson in the app, free and without an account.

Keep going: levels 3 and 4 are free

Create a free account to open the next two levels, save your progress and pick up where you left off. No card needed.

Next: Level 3, Tags, Triggers and Built-in Variables.

Create a free account →See the whole course

More like this

  • Google Shopping Mastery: Merchant Center to Sales

    Use one example online shop to get your products approved and visible on Google Shopping, Search, Images and AI Mode. You will build feeds that perform well, f…

    Course · Google · Design & Marketing · Capable · 19 levels · 4 free · Professionally curated by levelupwith.com

  • Local SEO: Get Found on Google Search and Maps

    Set up, optimise and protect a Google Business Profile for one example business, and build the citations, location pages, links, reviews and tracking that brin…

    Course · Google · Design & Marketing · Capable · 18 levels · 4 free · Professionally curated by levelupwith.com

  • Support Pro: Helping Users Move to Google Workspace

    Get first and second line support ready to carry users through a Microsoft 365 to Google Workspace cutover. You will prepare before cutover, map each Microsoft…

    Course · Google · Suite Support Pro: Configure and Fix · Expert · 40 levels · 4 free · Professionally curated by levelupwith.com

  • Google Workspace Support Pro: Gemini for End Users

    Diagnose and fix real Gemini tickets in Google Workspace. You'll work out which Gemini a user has from their edition and add-ons, read the Gemini app and servi…

    Course · Google · Suite Support Pro: Configure and Fix · Expert · 40 levels · 4 free · Professionally curated by levelupwith.com

  • Google Workspace Support Pro: Drive and Shared Drives

    Diagnose and fix Google Drive problems the way experienced support engineers do: read Admin console Drive policy and explain what it does, find out who can rea…

    Course · Google · Suite Support Pro: Configure and Fix · Expert · 34 levels · 4 free · Professionally curated by levelupwith.com

  • Google Workspace Support Pro: Meet and Chat

    Diagnose and fix the Meet and Chat faults that reach first and second line support: audio, video, screen sharing, spaces, external guests, recordings and room…

    Course · Google · Suite Support Pro: Configure and Fix · Expert · 40 levels · 4 free · Professionally curated by levelupwith.com