Server-side GTM: what changes and when it’s worth it
Published by the UTM Builder team at Limner.
With server-side tagging, the browser sends events to a server you control, on your own subdomain, and that server forwards them to GA4, Meta and TikTok. Google’s documentation describes the server container as something that doesn’t run in the browser or on the phone, but on a server under your control.
What changes in practice
- Your site talks to a single address, your subdomain, instead of loading several third-party scripts.
- Data passes through you before it reaches the platforms. You can strip a sensitive field or standardize a value along the way.
- The server container uses the same tag, trigger and variable model as the web container and comes with a GA4 client and tag already installed.
What doesn’t change
- Consent still applies. Sending through a server doesn’t authorize collecting what the person declined.
- An event that’s poorly defined on the site is still poorly defined on the server. The dataLayer has to be right first.
The mistake that doubles conversions
When the browser pixel and the server-side Conversions API send the same event, the platform needs to know it’s a single event. In Meta, the pixel sends eventID and the API sends event_id, with the same value and the same event name. That’s how Meta deduplicates. Without it, every purchase is counted twice and the platform’s results are inflated.
fbq('track', 'Purchase', {value: 249.90, currency: 'USD'}, {eventID: 'ORDER-10293'});
Meta’s documentation also warns that two consecutive server events with the same information aren’t discarded. Deduplication happens between browser and server, not within the server.
Cost and hosting
The server is billed based on usage by the host you choose: Google Cloud Run, in your own Google Cloud project, or a managed service. Check sizing and current pricing before you promise a client a timeline or a price.
When it’s worth it
- When the account already uses, or needs to use, Meta’s Conversions API and TikTok’s Events API: the server centralizes sending in one place.
- When the site loads many pixels and they weigh the page down.
- Not as a first step. If GA4 and the dataLayer aren’t right in the browser yet, start there.