server side tracking5 min readBy Phloz team

Server-side GTM for agencies: what it costs and how to scope it

Server-side tagging isn't a switch you flip — it's a hosted server container, a first-party subdomain, and ongoing upkeep. What it actually fixes, what it costs per client, and how to decide which clients get it.

TL;DR

Server-side GTM (sGTM) moves your tag firing from the visitor's browser to a server container you host on a first-party subdomain (e.g. metrics.clientsite.com). That buys you durable first-party cookies (survive Safari/ITP), some ad-blocker resilience, and clean server-side delivery to GA4, Google Ads Enhanced Conversions, and Meta CAPI. What it is not is free or automatic: it's hosting (~$20–120/client/mo depending on traffic + host), a DNS/subdomain + SSL setup, and ongoing maintenance — and it fixes nothing if your tags were wrong to begin with. The agency decision isn't "should we do server-side" in the abstract; it's "which clients clear the bar," and most of your roster won't. Below: what it actually fixes, the real costs, and how to scope it per client.


If you've decided server-side is worth considering, the next questions are the ones nobody answers in the setup tutorials: what does it cost per client, what does it genuinely fix versus what people think it fixes, and how do you decide which of your clients should get it? Because rolling sGTM out to every client because it sounds modern is how an agency lights money and maintenance hours on fire for accounts that didn't need it.

What server-side GTM actually is

In a normal (web) GTM setup, the browser loads tags and fires them directly to GA4, Google Ads, Meta, etc. Server-side inserts a middle layer: the browser sends events to a server container — your own endpoint on a first-party subdomain — and that container forwards them to the destinations from the server. Three pieces have to exist:

  1. A server container (a second GTM container, type "Server").
  2. A host to run it on — Google Cloud Run / App Engine, or a managed provider (Stape, Addingwell, etc.), or Cloudflare.
  3. A first-party subdomain (metrics.clientsite.com) pointed at that host, with SSL — so the requests are first-party, which is the entire point.

That subdomain requirement is why server-side is a per-client project, not a workspace toggle: each client's tracking rides on their domain.

What it actually fixes

  • First-party cookie lifetime. Cookies set server-side from your own subdomain aren't capped to a few days the way Safari/ITP caps client-side cookies — so attribution windows hold up. This is the biggest real win.
  • Ad-blocker / network resilience. Requests to metrics.clientsite.com aren't on the blocklists that google-analytics.com and connect.facebook.net are, so you recover a slice of dropped hits. (A slice — not all.)
  • Clean server-side delivery. It's the natural home for Meta CAPI and Google Ads Enhanced Conversions with proper deduplication, and for redacting data before it leaves.
  • Control. You decide what data goes where, can strip PII, and stop leaking everything to every vendor.

What it does NOT fix

  • A tag that was wrong. Server-side faithfully forwards whatever you send it. A broken purchase value or a missing Conversion Linker is still broken server-side — you've just moved it.
  • Consent. Consent Mode still applies; server-side isn't a consent bypass, and treating it as one is a compliance problem, not a feature.
  • "Tracking is now handled." It adds a moving part you have to monitor. Debugging is harder (server-side Preview is less obvious than the browser), not easier.

The real costs (per client)

  • Hosting: a managed host runs roughly $20–120/mo per client depending on request volume; self-hosting on Cloud Run is cheaper at low traffic but is yours to babysit. Either way it scales with the client's traffic.
  • Setup: a first-party subdomain + SSL, the server container, and re-pointing the web container's tags — a real engineering afternoon to a couple of days per client the first few times.
  • Maintenance: vendor template updates, monitoring that the endpoint is alive, and debugging when a destination changes. This is the cost people forget — it never goes to zero.

How to scope it: which clients clear the bar

Don't offer it to everyone. A client justifies server-side when two or more of these are true:

  • Meaningful ad spend (the recovered/durable conversions move bidding — low-spend accounts won't notice).
  • Safari/iOS-heavy or EU audience (where client-side cookie loss is worst).
  • Lead-gen with an offline close (server-side + first-party identifiers feed offline conversion import cleanly).
  • Real revenue events where a 10–20% attribution recovery changes decisions.

A small local client running $800/mo on Google Search does not clear the bar; the hosting + upkeep cost more than the insight. Be honest about that — it's a trust builder, and it keeps your own margin intact.

Shared vs per-client containers: you can run one server container for multiple clients, but the first-party-subdomain requirement and data isolation usually push agencies toward one per client (or per client domain). Map it before you build it.

Before and after you turn it on

Server-side multiplies the number of places tracking can silently break — so it raises the stakes on verification, it doesn't lower them. Run the pre-launch QA pass after the cutover, confirm each destination still receives in GA4 DebugView / Events Manager, and audit the web container that feeds it — a server container is only as good as the events the browser still has to send it.

This is exactly the surface area that gets unmanageable across a client book: which clients are server-side, on what host, on which subdomain, forwarding to which destinations, last verified when. Phloz models that as part of the per-client tracking-infrastructure map — server containers and endpoints are first-class node types with a health state — so "which clients are on server-side and is it still working?" is a view, not a spreadsheet you update from memory. The CRM for PPC agencies and pricing pages cover the workflow; the scoping call above is the part that saves you money — make it per client, and say no to the accounts that don't need it.