Analytics and Tracking

GTM Server-Side

Also called sGTM, server-side tagging

A tagging approach where vendor tags run on hosting you control rather than in each visitor's browser.

Quick facts: GTM Server-Side

Category
Analytics and Tracking
Also called
sGTM, server-side tagging
Level
Advanced
Affects
Measurement durability, vendor data control, engineering cost
Where to see it
Google Tag Manager (server container), cloud hosting, ad platform event tools
In this article4
  1. How server-side tagging works
  2. Why server-side tagging matters
  3. Where server-side tagging goes wrong
  4. How to act on it

How server-side tagging works

In the traditional setup each vendor’s script loads in the browser, reads the page and sends data straight to that vendor. Server-side tagging replaces most of that with a single request from the browser to an endpoint on your own domain. A container running on your hosting receives it, works out what happened, and sends the vendor-shaped requests onwards from the server.

The browser still has work to do, because an event has to originate somewhere. A server-side setup is therefore almost always a pair: a slim browser layer that reports what the visitor did, and a server layer that decides where it goes. Vendors whose features need code running in the page keep a browser tag as well.

Why server-side tagging matters

Browsers have steadily restricted what third-party scripts and cookies may do, and each restriction erodes measurement built on them. Data sent from your own domain sidesteps part of that, so the record of what visitors did tends to survive longer and match better inside the ad platforms.

Governance is the other reason, and in my view the more defensible one. When every vendor script sits in the page, each of them can see everything on it. When the data passes through a container you own, you can inspect and control what each vendor receives before it leaves your site at all.

Where server-side tagging goes wrong

It is sold far too often as a way around privacy rules, and it is not one. Consent still applies, because the obligation follows what you do with a person’s data rather than the machine the code runs on. A server-side setup that fires for someone who declined is exactly as non-compliant as a browser one — it is only harder for anyone to notice.

The second failure is scope. Teams migrate everything, discover that several vendors need browser code anyway, and end up maintaining two setups where there used to be one, with no measured gain. The third is cost creep, because the hosting bill follows traffic instead of staying flat.

How to act on it

Decide what problem you are solving before anyone starts building. If the answer is matching quality in a large ad account, or a real need to control what leaves the site, server-side is a sensible response. If the answer is vague, repair event naming, consent handling and conversion tracking in the browser first, because those faults travel with you across the move.

Where it does go ahead, run both setups in parallel long enough to compare them, enforce consent on the server as well as in the browser, and write down what each vendor is sent. Treat it as an engineering project inside the wider analytics and tracking plan, not as a tracking tweak somebody can slot into a Friday afternoon.

Do and do not

Do

  • Name the problem before starting a migration
  • Enforce consent on the server as well
  • Document what each vendor is sent

Do not

  • Buy or sell it as consent avoidance
  • Migrate every tag at once
  • Assume the hosting bill stays flat

Questions people ask about this

Does server-side tagging avoid consent requirements?

No. The obligation attaches to what you do with someone's data, not to where the code happens to run. If a visitor declines, tags on the server must be held back exactly as browser tags would be. Anyone selling server-side as a route around consent is describing a compliance risk, and that risk stays with you.

Is it worth it for a small business?

Usually not. The build takes specialist time, the hosting is an ongoing bill, and the gains show up mainly on large ad accounts and sites carrying heavy third-party scripts. A smaller business almost always recovers more measurement by fixing event naming, form tracking and consent handling in the browser setup it already runs.

What still has to run in the browser?

Anything that needs to see the page. Events begin with a visitor action, so something must detect the click, the form submission or the page view and report it. Certain advertising features also need their own code in the page to work fully. A server-side setup is a pair of layers rather than a replacement for one.

Related terms

Found this useful?

Share it, or ask an AI to summarise it

Back to the glossary

Knowing the term is the easy part

Applying it to your own site and budget is the work. Book a call and I will tell you what actually applies to you.