Server-side tagging

With server-side tagging, your tracking data goes to a server on your own domain first, and that server forwards it to Google, Meta and the other platforms. 14 articles

Server-side tagging means the browser sends one stream of events to a tagging server on a subdomain of your site. That server runs a Google Tag Manager server container, often called sGTM, which forwards each event to the platforms. Requests become first-party, cookies can be set by a server, and you decide what each platform receives. The plain-language explanation starts from zero.

A server container is configuration; it still needs a machine to run on. You can host it on your own cloud account or use managed sGTM hosting, and where it runs decides where your visitors' raw data is processed. Why host server-side GTM in the EU covers that choice, and the benefits and the costs help you decide whether it pays off.

Ready to build? The server container guide creates the container and its two clients. Below it are guides for GA4, Google Ads, consent, moving an existing container and debugging.

Start here: What is server-side tagging?

Server-side tagging

Frequently asked questions

What does server-side tagging cost to run?

Self-hosted, Google's own guide for Cloud Run estimates about $45 per server per month and recommends at least two servers in production. Then come updates, the certificate, DNS and monitoring. Managed hosting takes the server side off your hands: Measurebase starts free for one domain and 15,000 requests a month.

Does server-side tagging get past ad blockers?

Partly. A tagging server on your own subdomain gets past the blockers' domain lists, but its requests still end in fixed paths such as /g/collect, which pattern rules match. Measurebase's Enhanced script and Enhanced Ad Blocker Protection mask those paths. A visitor who refused consent must still not be tracked.

Does server-side tagging replace my web container?

No. The web container keeps running on your pages and sends its events to your server container instead of to each platform. Only its loader changes, and the Google tag gets server_container_url set to your tagging subdomain. Setting up a server container shows how the two connect.

Put it into practice

Start free, no credit card required.

Start free