Skip to main content

Learn · How-To

Analytics & Measurement Beginner

How to Install Google Tag Manager Properly

Google Tag Manager is the layer that lets you add, change and remove tracking without touching your website code every time. Nothing else in measurement works properly until it is installed correctly, and "installed correctly" turns out to be where most setups go wrong — not in the container, but in where the snippet sits and whether anyone ever verified it. This guide installs it once, properly, and then proves it. If you already have GTM on your site but have never checked it, start at the verification step.

About an hour 8 steps Last updated:
  1. 1

    Create the account and container

    Go to tagmanager.google.com and create an account for your organisation, then a container for your website. One account per business, one container per website. The common mistake is a container per subdomain or per section, which splits your configuration across places nobody remembers to check.

  2. 2

    Put both snippets where Google says, not where it is convenient

    GTM gives you two snippets. The first goes as high in the head as possible, the second immediately after the opening body tag. The second one is a noscript fallback and is frequently skipped because it seems redundant. Place both. If your platform only offers one field for custom code, that is a limitation worth knowing about before you build measurement on top of it.

  3. 3

    Install on every page, including the ones you forget

    The container must be on every page of the site, including the thank-you and confirmation pages where conversions actually happen. On a templated site this is usually one layout file. On a site that has accumulated landing pages built by different people over several years, it is not, and that is the case worth checking.

  4. 4

    Verify with Preview mode

    Use the Preview button in GTM to connect to your site. It opens your site in a debug session and shows whether the container loaded. If it will not connect, the snippet is either missing, in the wrong place, or blocked. Do not proceed until this works.

  5. 5

    Verify again without Preview mode

    Preview mode is a special case. Open your site in a normal window with developer tools open and confirm the container loads there too. A container that works in Preview and not in production usually means the snippet is on a staging template rather than the live one.

  6. 6

    Check it survives navigation

    Click through several pages, including a form page and a confirmation page, and confirm the container loads on each. Single-page applications need particular attention here, because a container that loads once and then never fires again on route changes looks fine on a first glance.

  7. 7

    Publish the container

    A GTM container does nothing until you publish a version. Preview mode works against an unpublished draft, which means it is entirely possible to test successfully, walk away, and have nothing running in production. Publish, then verify in a normal window one more time.

  8. 8

    Write down who has access

    Record which accounts have publish rights to the container. GTM can change what loads on every page of your site, which makes it a production system with production consequences, and it is usually governed less carefully than the website itself.

Pro tips

  • If a platform plugin offers to install GTM for you, check where it actually places the snippets before trusting it. Several put the head snippet in the body.
  • A container that is set up but never published is the single most common GTM fault we find.
  • Keep one container per site. Splitting by section feels organised and makes every later debugging session harder.

Want help putting this into practice?

Take our 2-minute quiz to see where your business stands, or talk to a specialist about getting this done for you.

More how-to guides

Book a 15-Minute Strategy Call →