Server-side tagging runs your tracking tags on a server you control instead of in the visitor's browser. The browser sends data to an endpoint on your own domain, and the server forwards it on to GA4 and your ad platforms.
Updated
Server-side tagging is a way of running your tracking tags on a server you control instead of in the visitor's browser. A tag is a snippet of code that sends data to a tool such as GA4 or an ad platform. In the usual browser-side setup, those snippets load on the page and each one sends data straight from the visitor's browser to its own vendor. With server-side tagging, the browser sends data to one place, and the tags run on a server that then passes the right data on to each tool.
The place the browser sends to is a first-party endpoint: an address on your own domain, usually a subdomain, that points at the tagging server. Because the request goes to your own domain rather than to a third party's, browsers generally treat it as first-party. Safari can still cap the lifetime of cookies set by a tagging server it judges to be a third party, for example one hosted on different infrastructure from your site, so how long cookies last depends on how the server is set up. This site sends its tracking through a subdomain of its own domain. The server is typically a second Google Tag Manager container, one built to run on a server instead of in the page.
What it can help with. Ad blockers and browser privacy restrictions can stop browser-side tags from loading or from reaching their vendors, and a first-party endpoint can reduce some of that loss. It gives you a point of control, because the server can remove or change fields before anything is forwarded, so you decide what data reaches each tool. It can also mean fewer third-party scripts running in the page. It is one common route for server-to-server connections, such as the Meta Conversions API, where the data is sent from a server rather than the browser. These are possibilities, not guarantees, and how much changes depends on the site and its audience.
What it does not fix. It does not make bad data good: if the events are wrong or the conversion tracking was never planned properly, moving it to a server only moves the problem. It does not remove the need to respect visitors' consent choices. It still needs the browser to send something, so it is a different route for the data, not a way around the visitor. And it is more to run than a browser-only setup, with a server, a domain and a second container to maintain. It is part of the analytics and tracking work I do when a site's measurement is worth that extra care.
Key points
- Server-side tagging runs tags on a server you control, not in the visitor's browser.
- A first-party endpoint is an address on your own domain that the browser sends data to, and that points at the tagging server.
- It can reduce measurement lost to ad blockers and browser restrictions, and gives you control over what is forwarded to each tool.
- It does not fix wrongly planned tracking and does not remove the need to respect consent.
- It adds a server, a domain and a second container to run, so it is worth it only where the control is worth the upkeep.
- It works with Google Tag Manager, not instead of it.
Frequently asked questions
Common questions about server-side tagging.
With browser tagging, each tool's code runs in the visitor's browser and the browser sends data straight to each vendor. With server-side tagging, the browser sends data to one endpoint on your own domain, and a server you control forwards it on. The tags that talk to GA4 and ad platforms run on that server, so the page carries fewer third-party scripts and you decide what leaves your site.
More parts to run. There is a server to set up, host and monitor, a custom domain to point at it, and a second container to build and test alongside the one in the browser. When something stops reporting, there are now two places to look. It also needs the same care over consent and data accuracy that browser tagging does, so it is not a shortcut. It suits sites where the extra control is worth the extra upkeep.
No. Server-side tagging in Google Tag Manager is a second kind of container that runs on a server, and it sits alongside the web container that runs in the browser. The web container usually still collects events on the page and sends them to the server. You use Tag Manager either way, with a different place for the tags to run.
Want to know what is working?
Tell me what you are trying to measure and I will show you how to capture it.
Book a 30-min consult