Server-side tracking means measurement data is sent from the browser to a server you control, and from there to Google Analytics, Google Ads, Meta and other platforms. In classic client-side tracking the browser loads a script from each vendor. With server-side tracking there is one connection from the browser, to your own subdomain such as data.yourdomain.com.
The most common solution is server-side Google Tag Manager (sGTM). The result is usually more complete data, a faster site and more control over what is shared.
Client-side vs server-side
| Client-side | Server-side | |
|---|---|---|
| Where tags run | In the browser | On your server |
| Third-party scripts | One per vendor | One or none |
| Ad blockers | Often blocked | Less affected |
| Cookies | Often capped at 7 days in Safari | Can be set as first-party cookies by the server |
| Data control | Vendors get what the browser sends | You filter and enrich before forwarding |
| Cost | Free | Hosting and setup |
Benefits
- More data, as fewer events are lost.
- Better signals for ad platforms via Meta Conversions API, enhanced conversions, Microsoft UET and TikTok Events API.
- Faster pages with fewer scripts.
- Privacy control: strip IP addresses, personal data and URL parameters before data leaves your server.
What it does not do
Server-side tracking is not a way around consent. GDPR and ePrivacy rules apply wherever the tag runs. See Consent Mode v2.
Setup
- Create a server container in Google Tag Manager.
- Choose hosting: Google Cloud Run or a managed provider such as Stape, Taggrs or Addingwell.
- Map a first-party subdomain via DNS.
- Point the Google tag to your server container URL.
- Configure clients and tags: GA4, Google Ads, Meta Conversions API and so on.
- Pass consent state and test in both web and server preview.
- Remove client-side tags now covered by the server, and deduplicate Meta events with event_id.
When is it worth it?
- You spend significant budgets on Meta, Google Ads or TikTok.
- You run ecommerce with many Safari and iPhone users.
- You want fewer third-party scripts for speed and privacy.
Frequently asked questions
What is server-side tracking?
Tracking where data is sent from the browser to a server you control, such as server-side GTM, and then forwarded to analytics and ad platforms.
Is server-side tracking allowed without consent?
No. Consent rules apply wherever tags run.
How much does server-side GTM cost?
The tool is free, but hosting is not. Managed providers start at a modest monthly fee for small sites.
Read also
Sources
- Google Tag Manager, Introduction to server-side tagging: developers.google.com/tag-platform/tag-manager/server-side/intro
- Meta for Developers, Conversions API: developers.facebook.com/docs/marketing-api/conversions-api/
- WebKit, Tracking Prevention in WebKit: webkit.org/tracking-prevention/
