Google Tag Manager (GTM) is a free Google tool that lets you add and manage tracking code on your website from one dashboard, without editing your site's code each time. For UK online shops, it is the usual way to run GA4, Google Ads conversion tracking, the Meta pixel and other tags, and to make them respect cookie consent. This guide explains how GTM works, how to set it up on WordPress and Shopify, which tags to add first, and how to handle UK consent rules. If you want your tracking set up properly so your ad spend is measured correctly, see our PPC agency page.

Facts below come from Google, Shopify and the ICO, or from named sources linked in the text. Checked November 2026.

Quick Answer

Google Tag Manager is a free tag management system. You install one container snippet on your site, then add tags (code that sends data), triggers (rules for when a tag fires) and variables (values the tags use) inside GTM. You test in Preview mode and then publish a version. For UK sites, set up consent mode so Google tags respect your cookie banner. Google's EU user consent policy covers users in the UK. On Shopify, GTM runs inside a custom pixel, and Shopify's own apps are often the better choice for Google and Meta tracking.

Not sure your tracking is right?

We will check your GTM container, GA4 and ad conversion tracking and tell you what is missing or double counting.

Get a free tracking check

What Google Tag Manager Is and How It Works

A "tag" is a small piece of code that sends information to another tool. For example, the GA4 tag sends page views to Google Analytics, and a Google Ads conversion tag tells Google Ads that someone bought something. Without a tag manager, each tag goes straight into your website code. Every change then needs a developer.

GTM changes this. You add one snippet of code to your site once. After that, you manage every tag from the GTM interface. Google describes Tag Manager as tag management "for free". A paid enterprise version, Tag Manager 360, also exists, but small and mid-sized businesses do not need it.

TermWhat it meansExample
AccountThe top level, usually one per company"Smith Candles Ltd"
ContainerHolds all tags for one website or appsmithcandles.co.uk
TagCode that sends data to a toolGA4 event, Google Ads conversion
TriggerThe rule that says when a tag fires"Purchase event", "All pages"
VariableA value a tag or trigger usesOrder value, page URL, product ID
Data layerA list on the page where your site puts data for GTM to readOrder total and currency after checkout
VersionA saved, published state of the container"v14 – added Meta purchase"

According to Google's setup guide, you do not need a separate container for each page. One web container covers the whole site. Container types also exist for iOS, Android, AMP and server-side tagging.

GTM vs the Google Tag vs Hard-Coding

You do not always need GTM. Here is how the three common options compare.

OptionBest forLimits
Google tag (gtag.js) onlySimple sites that only need GA4 and Google AdsAdding other tools still means editing code
Google Tag ManagerSites with several tools, custom events or frequent changesNeeds someone who understands tags, triggers and the data layer
Platform apps (e.g. Shopify's Google and Meta apps)Shopify shops wanting standard ecommerce trackingLess control over custom events
Hard-coded tagsRarely the best choice todayEvery change needs a developer; easy to break

Rule of thumb: if you run Google Ads plus at least one other ad platform, track form or button events, or change tracking more than a few times a year, GTM saves time and reduces mistakes.

How to Set Up Google Tag Manager

Step 1: Create an account and container

  1. Go to tagmanager.google.com and sign in with a Google account your business controls (not a freelancer's personal account).
  2. Select Create Account. Enter your company name and choose United Kingdom as the country.
  3. Enter your website address as the container name and choose Web.
  4. Accept the terms. GTM then shows you the installation code.

Step 2: Install the container snippet

GTM gives you two pieces of code. The first goes as high as possible in the <head> of every page. The second goes straight after the opening <body> tag. You can find them again any time under Admin > Install Google Tag Manager.

  • WordPress: use your theme's header settings, a header-and-footer plugin, or Google's Site Kit plugin, which can place the container for you. Only use one method, or the container loads twice.
  • Shopify: see the Shopify section below. It works differently.
  • Other platforms (Wix, Squarespace, BigCommerce, custom builds): most have a field for header code or a GTM ID setting.

Step 3: Add your first tag

Start with the Google tag for GA4. In GTM, click Tags > New, choose Google Tag, paste your GA4 measurement ID (it starts with "G-"), and set the trigger to Initialization – All Pages. Name it clearly, for example "GA4 – Google tag – all pages".

Step 4: Test in Preview mode

Click Preview. Google's preview and debug guide explains that this opens Tag Assistant, which connects to your site so you can see which tags fire on each page and event. Click around your site, add a product to the basket and check the right tags fire once, and only once.

Step 5: Publish a version

Nothing goes live until you click Submit and publish. Give every version a clear name and description, such as "Added Google Ads purchase conversion". If something breaks, you can roll back to an earlier version in a few clicks.

The Tags Most UK Shops Need First

Most ecommerce containers need the same core set. Add them in this order and test each one.

TagTriggerWhy it matters
Google tag (GA4)All pagesBase analytics. See our GA4 guide.
GA4 ecommerce eventsData layer events: view_item, add_to_cart, begin_checkout, purchaseShows revenue and the funnel in GA4
Conversion LinkerAll pagesHelps Google Ads measure clicks correctly
Google Ads purchase conversionPurchase eventLets Smart Bidding optimise to sales and value
Google Ads remarketingAll pagesBuilds audiences for remarketing
Meta pixel (if not done by a platform app)All pages plus eventsFeeds Meta ads optimisation
Microsoft Advertising UETAll pages plus purchaseNeeded if you run Microsoft Ads

The purchase tag must send the order value and currency (GBP) from the data layer. Without the value, Google Ads can count sales but cannot bid for revenue, and ROAS reporting is wrong. Our guide to ROAS explains why value matters.

Good: one purchase tag per platform, fired on a "purchase" data layer event, sending value excluding delivery, currency GBP and the order ID (so duplicates are removed).

Bad: a purchase tag that fires on "page URL contains /thank-you". A customer who refreshes the page counts as two sales.

For Meta, many shops now send events through the Conversions API as well as the pixel. Our Meta pixel and Conversions API guide explains how to avoid double counting.

In the UK, cookies and similar tracking are covered by PECR and UK GDPR, and the ICO enforces them. The Data (Use and Access) Act 2025 added some new exceptions. The ICO published its final guidance on storage and access technologies in April 2026. According to a summary by Privado, first-party analytics used only to improve your own service can, under strict conditions, run without consent, but you must still tell people and give them an easy way to object. Advertising and profiling tags still need consent. Get advice on your own set-up; this is not legal advice.

Google adds its own rules. Its EU user consent policy applies to end users in the European Economic Area, the UK and Switzerland. Google's consent mode update asks advertisers to pass consent choices to Google using the newer ad_user_data and ad_personalization signals.

How consent mode works in GTM

Consent mode tells Google tags what the visitor agreed to. Google's consent mode overview lists the main signals:

  • ad_storage – advertising cookies.
  • ad_user_data – sending user data to Google for advertising.
  • ad_personalization – personalised ads such as remarketing.
  • analytics_storage – analytics cookies.

There are two ways to run it:

  • Basic: Google tags do not load until the visitor accepts. Nothing is sent before consent.
  • Advanced: tags load with consent set to "denied" by default and send limited, cookieless signals. Once the visitor accepts, full measurement starts. Google uses the signals for conversion modelling.

Setting it up

  1. Choose a consent management platform (CMP) that supports Google consent mode and has a GTM template.
  2. Add the CMP's template tag in GTM, firing on Consent Initialization – All Pages, with UK defaults set to denied.
  3. In each tag's Advanced Settings > Consent Settings, check the built-in consent checks. Add extra consent checks to non-Google tags such as the Meta pixel.
  4. Test in Preview: before accepting, the Consent tab should show "denied"; after accepting, "granted".

Key point

A cookie banner that looks right but does not actually block tags is a common problem. Always test with Preview mode in a private browser window, before and after clicking accept and reject.

Google Tag Manager on Shopify

Shopify is different from WordPress. Its checkout is locked down, and tracking scripts at checkout run in a sandbox. Two dates matter:

  • According to Shopify's upgrade guide, the additional scripts box in checkout settings became view-only on 28 August 2025.
  • The same guide says 26 August 2026 was the deadline for stores on non-Plus plans to upgrade their Thank you and Order status pages. Old scripts in that box no longer fire there.

So if your purchase tracking used to live in "additional scripts", check it now.

Shopify's GTM custom pixel tutorial describes the supported route:

  1. Copy the GTM <head> code, remove the <script> tags, and paste it into a new custom pixel under Settings > Customer events.
  2. In the pixel, subscribe to Shopify customer events (such as checkout_completed) and push them to the data layer.
  3. In GTM, create custom event triggers that match those event names.

Shopify calls this an advanced feature that it does not support directly. It also notes limits: Tag Assistant's troubleshooting does not detect tags inside custom pixels, so you test with the Shopify Pixel Helper and your platform reports instead.

Our usual Shopify approach: use Shopify's own Google and Meta sales channel apps for the core GA4, Google Ads and Meta events, because they use Shopify's supported events. Use a GTM custom pixel only for extra tools or custom events. Never run the same tag through both, or sales are counted twice.

For more on the platform itself, see our Shopify UK guide.

Server-Side Tagging and Google Tag Gateway

Browsers and ad blockers increasingly limit third-party scripts. Two options help:

  • Server-side GTM: a second container that runs on a server you control (often on Google Cloud or a hosting service). Your site sends data to your server, which then passes it to Google, Meta and others. It gives more control over what data leaves your site, but it has hosting costs and needs technical set-up.
  • Google tag gateway for advertisers: Google's help page explains that it loads Google's tags from your own domain and sends measurement events to your domain first, which then forwards them to Google. If your site uses Cloudflare, you can set it up from Admin > Google tag gateway in GTM.

Neither option removes the need for consent. They change how data travels, not whether you are allowed to collect it.

Common Mistakes and a Checklist

Container owned by a freelancer or old agency. If they leave, you lose access. Your business should own the account, with others added as users.

Tags installed twice. GA4 in the theme and in GTM, or Meta in an app and in GTM. Revenue doubles and bidding goes wrong.

Publishing without Preview. One wrong trigger can stop all conversion tracking for days before anyone notices.

No naming system. "Tag 1", "Tag 2 copy" makes containers impossible to audit.

GTM health checklist

  • Your business owns the GTM account; old users removed.
  • Container installed once, in the head and after the opening body tag.
  • Tags named as "Platform – Type – Detail".
  • Consent mode tested: denied before accepting, granted after.
  • Purchase tags send value, GBP and order ID, and fire once per order.
  • Google Ads conversions match Shopify or WooCommerce orders within a sensible margin.
  • Every published version has a clear name and note.
  • Unused tags and triggers paused or removed.

Once tracking is right, you can trust your reports. For finding which campaigns drive those sales, read our UTM parameters guide.

Why UK Ecommerce Brands Choose Growth Pulse Media

Growth Pulse Media is a founder-led agency. Dirk van Greuning built and scaled an ecommerce business before starting it, and he still works on every account. We set up and audit GTM, GA4, Google Ads and Meta tracking before we spend a pound on ads, because bidding on bad data wastes budget. Google Ads or Meta ads management starts from £1,000 a month, with no lock-in contract.

Our PPC agency service covers Google Search, Shopping and Performance Max, with conversion tracking and consent mode set up correctly from day one.

Who This Is NOT For

Sites that only need basic page views. If you run no ads and only want visitor numbers, the Google tag alone is enough.

Anyone wanting to track people without consent. We set tracking up to follow UK GDPR, PECR and Google's consent policy.

Brands wanting tracking only, with no interest in using the data. We focus on tracking that improves ad results.

Frequently Asked Questions

Is Google Tag Manager free?

Yes. Google Tag Manager is free for any business. Google also sells Tag Manager 360 for large enterprises, but most UK small and mid-sized businesses never need it.

Do I need Google Tag Manager if I have GA4?

Not always. If you only use GA4 and Google Ads, the Google tag can be enough. GTM becomes useful when you run several ad platforms, track custom events, or change tracking often.

Does Google Tag Manager slow down my website?

GTM itself is light, but every tag you add loads extra code. Remove unused tags and avoid heavy custom scripts to keep your site fast.

Do I need consent mode in the UK?

If you use Google Ads for measurement or remarketing, yes. Google's EU user consent policy covers users in the UK, and Google asks advertisers to pass consent choices using consent mode. UK cookie law (PECR) also requires consent for advertising cookies.

How do I use Google Tag Manager on Shopify?

Shopify supports GTM through a custom pixel under Settings, Customer events. Many shops use Shopify's own Google and Meta apps for core tracking and keep GTM for extra tools, so nothing is counted twice.

What is the data layer?

The data layer is a list of information your website puts on the page, such as product IDs or order value. GTM reads it so tags can send accurate data, for example the real order total to Google Ads.

Want tracking you can trust?

We will audit your Tag Manager container, consent set-up and conversion tracking, and fix what is broken before you scale ad spend.

Book your free tracking audit

Dirk van Greuning — Founder, Growth Pulse Media
Dirk van Greuning Founder, Growth Pulse Media

Dirk has worked in digital marketing since 2016. He built and scaled an ecommerce business before starting Growth Pulse Media, and now runs SEO, Google Ads, Meta ads and email for ecommerce brands. Growth Pulse Media is a Shopify Partner and a Premium Omnisend Partner.

Connect on LinkedIn