Client-side tracking is living out its last glory years. Between adblockers, ITP, ETP and ever-tightening browser restrictions, a significant share of your data disappears before it ever reaches your servers. GTM Server-Side is Google’s answer to this problem.
Why client-side is no longer enough
Modern browsers increasingly limit third-party cookies and tracking JavaScript. Safari caps first-party cookies set by JavaScript at 7 days (ITP). Firefox applies similar restrictions with ETP. Chrome is preparing its own version.
The result: you lose somewhere between 15% and 40% of your data depending on the audience. That’s huge when you make business decisions based on those numbers.
Anatomy of a server-side container
The principle is simple: instead of sending hits straight from the browser to Google Analytics, you send them to your own server first.
Browser → your-domain.com/collect → Cloud Run → GA4 / BigQuery / etc.
The server acts as a smart proxy. It receives the data, enriches it if needed, then forwards it to the final destinations.
Deploy on Cloud Run
Google Cloud Run is Google’s recommended option. The steps:
- Create a dedicated GCP project
- Provision the GTM SS container from the Tag Manager console
- Set up a custom domain (a subdomain of your site)
- Point the web container’s hits to the server-side endpoint
gcloud run deploy gtm-server \
--image gcr.io/cloud-tagging-10302018/gtm-cloud-image:stable \
--region europe-west1 \
--allow-unauthenticated \
--min-instances 1
--min-instances 1 matters: it avoids the cold starts that would drop hits.
The concrete gains
After migrating, you can expect:
- +15 to 30% recovered data thanks to server-side first-party cookies
- Better control over what leaves your domain
- Enrichment of data server-side (user agent, geolocation)
- Stronger GDPR compliance: you own the data flow
To go further on putting this data to use, see the guide on the GA4 BigQuery export.