PERFMETRIX — in data we trust
All articles
GTM26 July 2026·6 min read

Google Tag Gateway vs server-side GTM: what each fixes

They're not alternatives, and Google's own documentation recommends running both. What each one actually does, and what neither of them touches.

DeBy Denis · Perfmetrix

Short answer: they solve different problems and Google recommends running both. Google Tag Gateway serves Google's tag scripts from your own domain, which makes them harder to block and keeps the cookies they set first-party. Server-side GTM is a container you control that receives hits, transforms them, and forwards them to Google, Meta and everyone else. If you have no tagging server, Gateway is the cheap durability win. If you already run one, Gateway takes the script-serving load off it. Neither recovers a user who declined consent, and any pitch that implies otherwise is selling you something.

What Gateway actually is

Google's description: it "lets you deploy a Google tag using your own first-party infrastructure, hosted on your website's domain." Setup runs through "your existing Content Delivery Network (CDN), load balancer, or web server."

That phrasing matters more than it looks. Your infrastructure fetches Google's scripts and serves them under your hostname — it isn't a DNS alias pointing at Google. The distinction shows up the moment someone tells you Gateway is "just a CNAME": it isn't, and the comparison misleads people about what browsers and blockers see.

What Google's documentation conspicuously does not do is describe the architecture in any detail. The page leads on four business benefits — conversion uplift, minimising third-party interactions, privacy by default, automatic setup — and leaves the mechanism to inference. When you're evaluating a claim about durability, that's worth registering.

What server-side GTM is, by contrast

A tagging server is a Node process running Google's container image, on infrastructure you pay for. Hits arrive from the browser, and the container decides what to do with them: reshape the payload, drop fields, enrich from your CRM, and forward server-to-server to each destination.

The two overlap in exactly one place — both can serve first-party scripts — and diverge everywhere else. Gateway does not transform data. It does not talk to your CRM. It does not let you strip personal data before it reaches Meta. Those are the reasons to run a tagging server, and Gateway doesn't touch any of them.

Google recommends both, explicitly

This is the part most comparisons miss, because it undercuts the framing. Google labels the combined setup "Recommended" in its own documentation:

Google tag gateway with CDN + SGTM (Recommended): The CDN serves Google scripts directly from your first-party domain for durability, while a separate SGTM server manages data collection, enrichment, and control.

The stated reason is cost and load. Running a tagging server alone means "the SGTM server handles both first-party script serving and data collection." Adding a CDN in front "combines the benefits of CDN-based script serving (lower cost, reduced SGTM server load) with the advanced data control features of SGTM."

So the decision isn't Gateway or server-side. It's: do you need data control, and if you already have it, is your tagging server also acting as a file server for no good reason?

Where the durability claim runs out

First-party serving raises the cost of blocking. It doesn't end it.

Blocklists match on request patterns, endpoint paths and payload signatures, not only on hostnames. Moving a script to your own domain removes the easiest signal, which is genuinely worth something — but the request still looks like what it is. Julius Fedorovicius, who published the most-watched Gateway walkthrough, pinned a correction to his own video on precisely this point: some extensions no longer block through Gateway, and Ghostery still blocks Google Analytics through it.

That's the honest shape of the benefit. Some blockers, not all, and the mix shifts as filter lists update. Treat "ad-blocker proof" as a claim requiring evidence rather than a property of the architecture.

One open question we haven't verified ourselves: practitioners on r/GoogleTagManager have raised that a request to googletagmanager.com persists in some Gateway configurations. We've not reproduced it and won't repeat it as fact — but if you're deploying Gateway specifically for first-party purity, it's worth watching your own network tab rather than taking anyone's word for it.

What neither one fixes

A user who declined consent.

Both technologies change how data travels. Neither changes whether you're allowed to collect it. If your banner records a refusal and you route the hit through your own subdomain to collect it anyway, you've built a compliance problem with better infrastructure. Consent Mode still has to be wired, the default state still has to fire before your tags, and a tagging server actually makes this easier to get wrong — because the browser-level blocking everyone implicitly relies on no longer applies to what leaves your server.

Before adding either one, find out what your site does today. The Consent Mode v2 detector loads your live site and reports whether the v2 signals are genuinely present or merely installed.

How to decide

No tagging server, modest spend. Gateway on your existing CDN. It's the cheapest durability improvement available and it doesn't add a monthly bill.

No tagging server, but you need data control. Build the tagging server first. Gateway improves script delivery; it won't strip personal data before it reaches Meta, and that's usually the reason people come looking.

Tagging server already running. Add Gateway to move script serving onto the CDN. Your container stops acting as a file server, which is what Google's own recommendation is about.

Either way, fix consent first. A durable pipe carrying data you had no basis to collect is a worse position than a leaky one, not a better one.

If you want the tagging server built so the consent layer survives the move rather than quietly bypassing it, that's what we do.

Sources

  1. 1.Google — Google tag gateway for advertisers · Checked 2026-07-26
  2. 2.Google — Google tag gateway with a CDN and server-side tagging (the 'Recommended' combined setup) · Checked 2026-07-26
  3. 3.Google — Set up server-side tagging with Cloud Run (~$45/server/month) · Updated 12 May 2026, checked 2026-07-26
  4. 4.Google — Server-side tagging fundamentals: planning infrastructure requirements and costs · Updated 9 Jan 2026, checked 2026-07-26
  5. 5.Analytics Mania — 'Google Tag Gateway. What is it and how to configure it?', including the author's pinned correction on which extensions still block · Checked 2026-07-26

Find out what your site leaks — in 30 seconds

Run the free consent checker on your own domain, or book a call and we'll walk your setup together.