Skip to main content

Free download

Install Google Tag Manager on a website

Create a Google Tag Manager container, install it on every page of a website exactly once, and prove it loads before any tags are added.

We reply within one working day. No pitch, no pressure.

Tracking & AnalyticsFreePDFWW-001 · v1.0
Time
30 minutes
Difficulty
Beginner
Audience
Marketers and developers with admin access to the website and a Google account

Tools: Google Tag Manager · Tag Assistant · Website CMS or code repository

Download free PDF

Free download. No account needed. Resources licence. Branded PDF in the Wright Websites design system. Covered by the resources licence.

01 / Procedure

How to follow it

Purpose

Google Tag Manager (GTM) lets you add and change tracking tags without editing website code each time. This procedure gives a website one clean GTM container that loads on every page, owned by the business rather than by an individual or agency. It is finished when Tag Assistant confirms the container loads once, on every page template, with nothing else firing yet.

Scope

In scope

  • Creating a GTM account and web container owned by the business
  • Installing the container snippet on every page through the CMS, a plugin or the site code
  • Verifying the installation with Tag Assistant and GTM Preview mode
  • Publishing an empty baseline version

Out of scope

  • Adding GA4, Google Ads or other tags (see WW-002 and WW-013)
  • Cookie consent configuration and Consent Mode
  • Server-side tagging

Roles and responsibilities

RoleResponsibility
ImplementerCreates the container, installs the snippet and runs the verification.
Website ownerOwns the GTM account, grants access and approves changes to the live site.
ReviewerChecks the quality checks before the work is closed.

Prerequisites

  • Admin access to the website's CMS, theme settings or code repository, and permission to change the live site.
  • A Google account belonging to the business (for example marketing@business.com), not a personal account.
  • The website's main domain and a list of its page templates (home, content page, blog post, product, checkout, thank-you).
  • Confirmation that no other GTM container or hard-coded GA4 tag is already installed. If one exists, stop and agree with the owner whether to reuse it.

Procedure

Check for an existing installation

Avoid duplicate containers, which double-count every event.

  1. Open the website's home page in Chrome, right-click and choose View page source. Search the source for GTM- and gtag(.

  2. Record any container IDs (GTM-XXXXXXX) or GA4 measurement IDs (G-XXXXXXXXXX) you find in the work ticket.

    [!WARNING] If a container already exists, do not install a second one. Ask the website owner for access to the existing container and continue from the verification phase.

  3. Repeat the search on one page of each other template, because some themes only add tags to certain templates.

Create the account and container

Set up GTM so the business owns it from day one.

  1. Sign in to tagmanager.google.com with the business Google account and click Create Account.
  2. Enter the business name as the Account Name and select the business's country.
  3. Enter the website's main domain, without https://, as the Container name, choose Web as the target platform, then click Create and accept the terms.
  4. Copy the container ID shown at the top of the workspace (it starts with GTM-) into the work ticket.

Install the container snippet

Add both parts of the snippet to every page, once.

  1. In GTM, open Admin, then Install Google Tag Manager. Keep this window open; it shows two code blocks.

  2. Choose the installation method that matches the website:

    • WordPress: install a reputable GTM plugin, or add the snippet through the theme's header settings. Enter only the container ID if the plugin asks for it.
    • Hosted builders (Duda, Wix, Squarespace, Shopify): paste the code into the site-wide header code injection or the builder's native GTM field.
    • Custom code or frameworks: add the first block as high in the <head> as possible and the second block immediately after the opening <body> tag, in the shared layout used by every page.
  3. Save and publish the website change, then clear any website or CDN cache so visitors receive the new code.

    [!IMPORTANT] Use one method only. Installing through a plugin and the theme header at the same time loads the container twice.

Verify the installation

Prove the container loads exactly once on every template.

  1. In GTM, click Preview, enter the home page URL and click Connect. A new tab opens with the Tag Assistant badge.
  2. In the Tag Assistant tab, confirm the container ID appears once and the summary shows the Container Loaded event.
  3. Visit one page of each template in the connected tab, including the thank-you page, and confirm the container loads on each.
  4. View the page source of the home page again and confirm GTM- appears for your container ID only.

Publish a baseline version

Create a clean starting point you can roll back to.

  1. Close Preview mode. In GTM, click Submit, choose Publish and Create Version, and name it v1 · Baseline install · empty container.
  2. In Admin, open User Management and confirm the business account is an administrator. Add the agency or implementer with the lowest permission they need.

Quality checks

  • Only one GTM container ID appears in the page source of every template.
  • Tag Assistant shows Container Loaded on the home page, a content page and the thank-you page.
  • Version 1 is published and named as described.
  • The GTM account is owned by a business Google account, not an individual.
  • The container ID is recorded in the work ticket and the client record.

Troubleshooting

SymptomLikely causeFix
Tag Assistant says it cannot connectAd blocker or privacy extension blocking the previewPause the extension or use a clean Chrome profile, then reconnect.
Container loads on some pages onlySnippet added to one template rather than the shared layoutMove the snippet to the site-wide header or layout file.
Container appears twiceInstalled by both a plugin and the theme or builderRemove one installation method and clear the cache.
Changes don't appear on the live siteWebsite or CDN cache serving old pagesPurge the cache and test in a private window.

Records

  • Record the container ID, account owner, installation method and publish date in the client record.
  • Keep the GTM version name and number in the work ticket so the baseline can be restored.
  • Retain these records for the life of the client relationship.

References

Related procedures