New: weekly live session, "The Hidden Leak: Where Your Ad Budget Disappears". Save a seat

Updated

Google Tag Manager Setup That Controls All Your Tracking Tags in One Place

We build and clean up GTM containers so GA4, Google Ads, Meta, TikTok and LinkedIn tags run from one documented, versioned place, with consent handled first and values from a proper data layer.

  • web-container
  • server-container
  • consent-mode-v2
  • data-layer
  • tag-assistant-qa
Google tag manager setup for a sample brand: a GTM workspace with clearly named tags for the Google tag, GA4, Google Ads, Meta, TikTok and a consent banner, a published version note and a preview summary showing tags fired once with all four consent signals
The basics

What Is Included in a Google Tag Manager Setup?

A Google Tag Manager setup means creating a GTM container, installing it on every page, and building the tags, triggers, variables, data layer and consent rules that send clean data to each ad platform. Done well, marketing can change tracking without a developer, and anyone can read the container a year later.

What’s the difference between the Google tag and Google Tag Manager?

The Google tag (gtag.js) is one piece of code that sends data to Google products such as GA4 and Google Ads. Google Tag Manager is a container that manages the Google tag and every other tag on your site, including Meta, TikTok and LinkedIn, with triggers, versions and permissions. Most sites want the Google tag inside GTM.

The Google tag vs Google Tag Manager choice, with server-side GTM as a third option:

QuestionGoogle tag in site codeGoogle tag inside GTMServer-side GTM added
Meta, TikTok, LinkedIn tagsEach pasted into code separatelyAdded from templates in one placeAlso forwarded from your server
Change without a developerNoYesYes, once the server is running
Version history and rollbackOnly through your code repositoryEvery publish is a version you can restoreSeparate versions for the server container
Consent Mode v2Coded by handConsent platform template plus built-in consent checksReads the consent state sent from the browser
Ad blockers and browser limitsExposedExposedMore resilient on a first-party subdomain
Best forA small site running GA4 onlyAlmost every business running adsBrands on two or more ad platforms

Per Google’s Tag Manager documentation as of November 2026.

The building blocks

GTM Container Setup: Tags, Triggers and Variables

How does Google Tag Manager work?

GTM listens for events on your site, such as a page load, a click or a data layer push. Each event is checked against your triggers. When a trigger matches, its tags fire and read their values from variables. Nothing fires that a trigger does not allow, so the trigger list is the real rulebook.

That is the core of any GTM container setup. Read each row as a sentence, and keep IDs in variables: a GA4 ID typed into 30 tags means 30 edits.

  • TagGoogle Tag - Site
    TriggerInit - All Pages
    VariablesConst - GA4 ID
  • TagCMP - Consent Banner
    TriggerConsent Init - All Pages
    VariablesDefault states by region
  • TagGA4 - Event - purchase
    TriggerCE - purchase
    VariablesDLV - ecommerce.value, DLV - transaction_id
  • TagGAds - Conv - Lead
    TriggerCE - generate_lead
    VariablesUPD - Enhanced Conv (hashed email)
  • TagMeta - Event - Purchase
    TriggerCE - purchase
    VariablesDLV - ecommerce.value, DLV - event_id
Sample GTM container map: consent initialization first, then data layer events, variables, triggers and tags feeding GA4, Google Ads, Meta, TikTok, LinkedIn and a server container
A sample container map we hand over with every build. Your events and platforms will differ.
The data layer

GTM Data Layer Design for Ecommerce and Lead Events

Why does GTM need a data layer?

A data layer is a JavaScript object your site fills with facts, such as order value, currency, product IDs or form name, at the moment something happens. GTM reads those facts instead of scraping text off the page, so a redesign or a renamed button does not quietly break purchase tracking.

order-confirmed.jssample push
// Clear the previous ecommerce object first
window.dataLayer = window.dataLayer || [];
dataLayer.push({ ecommerce: null });
dataLayer.push({
  event: "purchase",
  event_id: "ord_10482",
  ecommerce: {
    transaction_id: "10482",
    value: 148.00,
    currency: "GBP",
    items: [{ item_id: "SKU-221", price: 74.00, quantity: 2 }]
  }
});

The spec we hand your developer

  1. One push per real event, with Google’s recommended names: add_to_cart, purchase, generate_lead.
  2. Numbers as numbers. 148.00, never "£148.00".
  3. A transaction_id on every order, plus an event_id the server copy of the event can reuse for deduplication.
  4. ecommerce: null before each ecommerce push, as Google’s developer documentation recommends.
  5. Pushes only after success: the confirmed order, the validated form.

Which events GA4 should report is a separate decision, covered on our Google Analytics 4 setup and key events page.

Privacy and resilience

Consent Mode v2 and Server-Side Google Tag Manager

How do you set up Consent Mode v2 in GTM?

Install your consent platform’s template from the Community Template Gallery, fire it on the Consent Initialization trigger, and set default states for ad_storage, analytics_storage, ad_user_data and ad_personalization by region. Google tags then adjust themselves; other tags get additional consent checks so they wait for permission.

  • Templates exist for Google-certified platforms such as Cookiebot, OneTrust and Usercentrics.
  • Advanced mode lets Google tags send cookieless pings when consent is denied, which feeds conversion modelling; basic mode blocks them until consent.

Do I need server-side GTM?

If you advertise on two or more platforms and rely on purchase or lead data, usually yes. Server-side Google Tag Manager puts a container on your own subdomain that receives events from the web container and forwards them to GA4, Google Ads, Meta and others, so you decide exactly what each platform gets.

  • Hosted on Google Cloud Run or a managed host, on a subdomain such as data.yourbrand.com.
  • Server tags reuse the data layer event_id so browser and server copies deduplicate. Our Meta Pixel and Conversions API setup page covers that side in depth.

Reference: Google’s server-side tagging documentation.

House rules

GTM Naming Conventions, Workspaces and Publishing Rules

A container is only as useful as it is readable, so the naming convention is agreed before anything is built.

Naming convention cardpattern → example
Tags
Platform – Type – Detail
GA4 - Event - purchaseMeta - Event - Lead
Triggers
Type – Detail
CE - purchaseClick - Header PhoneInit - All Pages
Variables
Type – Name
DLV - ecommerce.valueConst - GA4 IDURL - Path
Folders
One per platform, numbered
01 Consent02 Google03 Meta09 Utilities
Versions
Date and change; why and how tested in the notes
2026-11-04 Meta purchase via server

Workspaces and versions

Free GTM gives each container three workspaces. One job per workspace keeps half-finished changes out of live. Every publish is a version, so a bad change is undone by republishing the last good one.

Who should get publish rights?

Very few people, because Publish is the permission that matters. GTM has four container permissions: Read, Edit, Approve and Publish. We give most of your team Read or Edit, one or two owners Publish, and keep account Administrator with your business, never with an agency alone.

  • ReadAnalysts and stakeholders
  • EditMarketers and agencies
  • ApproveA senior reviewer
  • PublishOne or two owners
Quality checks

Preview and Tag Assistant QA Before Anything Goes Live

How do you test GTM tags before publishing?

Open Preview in GTM, which connects Tag Assistant to your site, then do the real actions: view a product, add to basket, place a test order, submit a form. For each event, Tag Assistant shows which tags fired, which did not, and what every variable held at that moment.

Sample Tag Assistant preview session for a test order: event timeline from Consent Initialization to purchase, four purchase tags fired once, lead tags not fired, and variables showing value, currency, transaction ID, event ID and consent state
  • OnceOne fire per event, not again on refresh.
  • ValuesA number, the right currency, an order ID.
  • ConsentAccept and decline both behave as promised.
  • TimingNothing fires before the banner answers.
  • PlatformsMatched in GA4 DebugView and Meta Test Events.
Inherited containers

Google Tag Manager Audit and Container Clean-Up

Inherited a container? A Google Tag Manager audit starts with an export, then we clean up in a separate workspace while live keeps running.

Sample container clean-up: a messy tag list with names like Tag 14, Copy of GA4 purchase and FB pixel OLD next to a clean list of named tags grouped into Consent, Google, Meta and Utilities folders
  • Copy of GA4 purchase (2)
    Duplicates that count one order twice.
  • UA - Pageview
    Universal Analytics tags left behind; standard UA properties stopped processing data in July 2023.
  • FB pixel OLD
    Custom HTML where a template now exists.
  • All Pages on a conversion tag
    A lead recorded on every page view.
  • AW-123456789 typed into 20 tags
    Hardcoded IDs instead of one Constant variable.
  • Ex-staff with Publish
    Old employees and agencies who can still go live.

If the container is fine but the campaigns are not, our Google Ads account audit is the better first step.

How we work

How We Set Up Your GTM Container, Step by Step

How long does a GTM setup take?

A standard web container with the core tracking tags typically takes under a week. Adding a server-side container, a data layer that needs developer time, or untangling a large existing container takes longer, and we give you a dated plan after the audit.

  1. Audit or fresh start

    Admin › Export Container

    Export and list everything, or create a clean container owned by your company.

  2. Measurement plan and naming

    Folders

    Events, platforms, naming card and folders, agreed before any tag is built.

  3. Data layer spec

    Variables › Data Layer Variable

    We write the spec, your developer (or ours) adds it, and each field becomes a variable.

  4. Consent first

    Admin › Container Settings

    Consent template on Consent Initialization, defaults by region, Consent Overview on.

  5. Build in a named workspace

    Workspaces › New

    Google tag, GA4, Google Ads with enhanced conversions, Meta, TikTok and LinkedIn, then the server container if warranted.

  6. Preview and QA

    Preview › Tag Assistant

    Every event tested on real pages, consent accepted and declined, desktop and mobile.

  7. Publish, permissions and handover

    Submit › Publish and Create Version · Admin › User Management

    A version with a real description, access reviewed, and the container map handed over. You keep full ownership.

Proof

Tracking First, Then Scale: What the Shot Vet Case Shows

EmergingAds is a performance marketing agency founded in 2021 and based in Gurugram, India, working with brands in the US, UK, UAE, India and Australia. We have served 85+ brands.

Shot Vet: fixed tracking first

Client

Shot Vet · Veterinary · USA · Meta + Google Ads

Found

Meta ads running on broken conversion tracking, so scaling decisions rested on incomplete data.

Fixed first

The data foundation came first: leads counted correctly and checked against real enquiries. Then the Meta campaigns were rebuilt and Google Ads added.

Result, as on the case page
10,000+leads
Under 3 monthsto get there
$18cost per lead
Read the Shot Vet veterinary lead generation case study →

How we approach your container

  • Read-only access in week one. No edits until you see the audit.
  • A clean Google Tag Manager setup before campaign changes, because bidding learns from what the tags send.
  • Results judged against your real orders or CRM.

The Shot Vet case page describes the tracking repair, not the tools used, so we claim no more than it says.

Related services

Related Tracking and Google Ads Services

GTM is the delivery layer for these services and for the Google Ads management service that depends on them.

FAQs

Google Tag Manager Questions, Answered

What is Google Tag Manager used for?

It manages marketing and analytics tags, such as GA4, Google Ads and Meta, from one interface instead of site code. It is free, and every change is versioned.

Do we need Tag Manager if our developer already added tracking tags?

Not strictly, but you will want it. Hardcoded tags work, yet every future change needs a developer again. GTM lets marketing change tags without a code release.

How long does it take to set up Google Tag Manager properly?

Usually under a week for a standard web container with the core tags. Server-side, new data layer work or a large clean-up adds time.

Is server-side GTM worth it for a small business?

Often not at first. On one platform with modest traffic, a clean web container with enhanced conversions is the better start. On two or more platforms, server-side is usually worth the extra setup.

Can you clean up our existing messy container?

Yes, it is one of our most common requests. We export it, remove dead and duplicate tags, apply a naming convention and move repeated values into variables, all in a separate workspace.

Will changes in GTM slow down or break our website?

Not when they are tested. Every change goes through Preview first, and any bad version can be rolled back in minutes.

Who owns the GTM container after you finish?

You do. Your business holds the account Administrator role, we work with the access you grant, and you keep the container map and naming card.

Does Google Tag Manager work on Shopify and WordPress?

Yes, with one Shopify caveat. On WordPress GTM goes in the theme or a plugin. Shopify checkout pages no longer accept theme code, so purchase events come through Shopify’s Customer Events instead.

Do I need Consent Mode v2 if I only sell in the US or India?

Google does not require it there, but we still recommend it. Google requires the signals for users in the European Economic Area, and US state laws and India’s data protection law point the same way.

How is this different from conversion tracking setup?

GTM is the tool that deploys and organises tags; conversion tracking setup decides what counts as a conversion and how each platform receives it. We usually do both together because one depends on the other.

Submit changesWorkspace: your-container-audit

Set Up Google Tag Manager as the Single Control Point for Your Tracking

Give us read access. We check tags, triggers, consent and data layer, and tell you what to fix first.

Publish and create version
Version name

Free GTM and tracking audit

Version description

A written list of broken, duplicate and missing tags, in priority order.

Client testimonials

Real Brands. Real Results.

What founders and marketing leads say after working with us.

5.0from verified clients
Verified client
“Generating over $500k+ per month for my Kids clothing brand.”
↑ $500K+ monthly revenue
Anthony CampoFounder, The Simple Seed Baby
Verified client
“Generating over $20K per month for my courses.”
↑ $20K+ monthly revenue
Caterina CiacataniFounder, Sixty Social Seconds
Verified client
“EmergingAds helped me generate qualified leads for my Online Yoga Coaching Business consistently.”
↓ Consistent qualified leads
Lilith MoonFounder, Shamanic Yoga
Verified client
“The audit found $4,200 per month in wasted spend across three Paid campaigns we assumed were performing.”
↓ $4,200/mo wasted spend found
PrimeWeldE-Commerce Director, USA
Verified client
“The audit identified three structural problems in our Meta campaigns we had lived with for months.”
↓ 44% cost per lead reduction
Oak TravelMarketing Lead, UK
Verified client
“Piyush and the team helped me grow my business in the early stages.”
↑ Business scaled from early stage
Mellissa RickerFounder, Engineered to Scale
Verified client
“The EmergingAds team generated ticket sales for our event through a focused digital campaign.”
▶ Event ticket sales delivered
Michael DynanDirector, Design Mumbai
Chat on WhatsApp
ROAS checkFree Ad Audit