Google tag gateway or server-side GTM: which, if either, do you need?
Both put your own domain between the browser and Google. They solve different problems, cost different amounts and need different upkeep.
Published
Google tag gateway serves Google's tags and measurement requests through your own domain, using a CDN or load balancer you already run, and it is built for Google products. Server-side GTM gives you a container on a server you control, where you can filter or enrich data and send it to Google and non-Google tools, at the cost of hosting and maintenance. If you mostly use GA4 and Google Ads, start with the gateway. If you also need Meta, LinkedIn or control over the data on a server, look at server-side GTM. Neither one changes your consent obligations.
Seeing this in your own setup?
Tell me what you're working on
What Google tag gateway does
Google tag gateway for advertisers, called first-party mode until May 2025, loads the Google tag from your own domain and sends some measurement requests through that domain before they reach Google. It runs on infrastructure you already have: a CDN, a load balancer or a web server.
Google offers guided setups for Cloudflare, Akamai, Fastly, Amazon CloudFront and Google Cloud's global external Application Load Balancer, which became generally available on June 1, 2026. Google says the integration itself is free, though you pay your provider's usual costs, such as load balancer usage on Google Cloud.
What server-side GTM does
Server-side GTM adds a second container that runs on a server you host, on Google Cloud or a hosting service. The browser sends data to your server, and your server container decides what to forward and where. You can remove fields, add data from your own systems, and send events to non-Google tools such as Meta's Conversions API. You also take on monthly hosting costs and someone responsible for keeping it running.
How to choose
- Mostly GA4 and Google Ads, a supported CDN and little engineering time: start with Google tag gateway.
- Several ad platforms, a need to filter or enrich data before it leaves your systems, or conversions sent from your backend: server-side GTM.
- Both: Google documents a combined setup where the CDN serves the scripts and a server-side container handles collection.
- A small site whose tracking already works: neither may be worth the effort yet. Fix what you have first.
Two details that catch people out
- Location. Google sees your CDN's address instead of the visitor's, so the CDN has to forward location headers. Without them, Google can't tell which region a visitor is in. Some one-click integrations handle this for you. Check yours.
- Consent. Routing tags through your domain changes where requests go, not what you're allowed to collect. Consent Mode and your banner still apply, and you can test them the same way.
Sources: Google Tag Manager release notes and Google tag gateway for advertisers.