TRACKING SPECIALIST — BARIS ASA · LONDON
Synctag
Start the check → TRACKING SPECIALIST — BARIS ASA · LONDON

← The field manual

MANUAL · CH.06

How to scope a move to server-side tracking: seven decisions to write down before anyone builds the server

Filed

Baris Asa, Synctag, tracking specialist, London · Last checked:

Plan a move to server-side tracking as a one-page spec, agreed before anyone builds a server. It records seven decisions: the gap the server must close, the route (Google tag gateway, a platform app or a server container), which platforms and events go through it, what every server event carries, the domain and cookie set-up, how consent reaches the server, and who hosts and maintains it. A server built without the spec usually ships with no baseline to judge it, a duplicate count or a cookie Safari still deletes.

The business owns decision 1, whoever runs the tracking owns 2 to 4, a developer owns 5, the privacy lead signs off 6, and a named person owns 7. Each decision has a default answer below. Departing from it is fine, as long as the reason is written down.

This chapter is the plan. The build and switch-over are in the migration plan, which works through the spec stage by stage. Whether you need a server at all is in is server-side tracking worth it for a small store, and the loss itself is on file at F-401 (browser-only collection losing sales to Safari and ad blockers).

What goes in the spec, and who signs each line?

Exhibit A: the server-side spec for a UK online shop selling through Google Ads and Meta (illustrative, not a client). It sits with the tracking documentation, next to the tag inventory.

DecisionDefault answerOwnerDetail in
1. The gapOrders vs GA4, Ads and Meta for two closed weeks, filedBusinessWorth it?
2. The routeServer container only if several platforms or server cookies are neededTrackingGateway vs server
3. What movesPurchase and key events to GA4, Google Ads and Meta; Pixel staysTrackingBelow
4. What each event carriesDedup key, click IDs, hashed customer data, consentTracking and developerExhibit B
5. Domain and cookieYour own domain; GA4 cookie switched to the server lastDeveloperSafari and the gateway
6. ConsentSet once in the web container; non-Google tags gated in the serverPrivacy lead and trackingConsent and sGTM
7. Host and ownerA named person for updates, capacity and alertsNamed ownerHosting

A line nobody can fill is the first thing to settle. A spec with a blank owner on line 7 is a server nobody will notice going down.

Decision 1: what gap must the server close?

Write down the number the server is meant to move, before it exists. Two closed weeks, per day: paid orders from the store, GA4 purchases, Google Ads conversions by conversion action, and Meta Purchase events received in Events Manager. Add one reading by browser: in GA4, Reports, Tech, Tech details, New users divided by Active users for Safari and for Chrome.

Then rule out the cheaper faults. A consent update that never fires (F-201 ) or a click ID lost in a redirect (F-204 ) looks like the same shortfall, and a server fixes neither. What remains after both are fixed is the gap the spec is written against.

Default: build only if Google Ads or Meta bid towards purchases and a steady shortfall survives those fixes. The thresholds and the break-even sum are in the worth-it note. If the two weeks show nothing, the spec stops at line 1.

Decision 2: which route: gateway, platform app or server container?

Three routes sit under the name “server-side”. They do different jobs.

  • Google tag gateway. Google’s guide says the site loads the Google tag from your own domain and sends some measurement requests to Google through it. The tag still runs in the browser and writes its cookies in JavaScript, so Safari’s 7-day rule still applies, and Meta’s Pixel is untouched.
  • A platform’s own server connection. On Shopify, the Facebook & Instagram app set to Enhanced or Maximum data sharing sends Conversions API events as well as the Pixel. For a shop where Meta is the main platform, that may be the whole server path.
  • A server container (server-side GTM). A Tag Manager container on a server you control. Google’s introduction puts it plainly: only you have access to the data in the server until you choose to send it elsewhere. It is the only route here that can set a cookie from your own server and feed several platforms from one stream.

Default: gateway if the aim is only Google’s tags loading from your domain; the platform app if Meta is the only target; a server container if two or more platforms need server events, or if the Safari cookie is part of the goal. Gateway vs server-side GTM has the comparison; the rest of this chapter assumes a server container.

Decision 3: which platforms and events go through the server?

The web container stays on the site. The server receives what the browser sends, so the spec lists, per platform, which events leave from the server and which stay in the page.

GA4. The Google tag in the web container sends its hits to the server, and the GA4 tag there forwards them. Every GA4 event moves together, which is why this line usually comes first.

Google Ads. Google’s server-side Ads guide builds on GA4: it needs the GA4 client in the server container, a GA4 event tag in the web container sending the key events, and a Conversion Linker tag in the server container. So Google Ads server events depend on line 3’s GA4 route existing.

Meta. The Conversions API tag in the server sends Purchase and the other key events. Meta’s guidance is to keep the Pixel and send the same events through both, a redundant set-up, with deduplication (line 4).

Default: every GA4 event once the Google tag points at the server; for Google Ads and Meta, purchase and the few events your campaigns bid on. Other tags (TikTok, Pinterest, Microsoft Advertising) stay in the browser unless the gap from line 1 is in their numbers. If a GA4 event is ever sent both from the page and from the server, only purchases are deduplicated, by transaction ID; every other event counts twice. Send each from one path.

Decision 4: what must every server event carry?

A server event without the right fields counts twice or matches nobody. The spec lists four fields per platform.

Exhibit B: what each server event carries, by platform

PlatformDedup keyIdentityConsent
GA4transaction_id on purchaseClient ID from the hitConsent parameters on the hit
Google Adstransaction_id, same conversion action as the browser tagClick ID via the server Conversion Linker; user_data (email or phone)Same hit
Metaevent_name and event_id, matching the Pixelfbp, fbc, hashed email and phoneA check you build
  • Dedup key. GA4 deduplicates purchases with the same transaction ID. Google Ads does the same only within one conversion action, so a server copy sent to a second action counts the sale twice. Meta discards a repeat with the same event name and event ID within 48 hours. Missing keys turn the server into F-102 (one sale counted twice).
  • Identity. For Google Ads Enhanced Conversions through the server, Google’s guide asks for at least an email or phone number in a variable passed as user_data on the web container’s Google tag; pre-hashed values must be SHA256 and use keys starting sha256_. For Meta, fbp and fbc are cookie values from the visitor’s browser that Meta asks you to refresh regularly, and Event Match Quality, a score out of 10 per event in Events Manager, rises with customer information such as email and phone. Thin data here is F-402 on the Google side, whatever the transport.
  • Consent. Line 6.

Default: the developer puts the order number, the event ID and the checkout email in the data layer on the confirmation page; the tracking side maps them. Without that, nothing on line 4 can be filled.

Google’s custom-domain guide gives three options. Same origin, a path on your shop’s own domain served through a CDN or load balancer, is what Google calls best practice. A subdomain such as data.yourshop.co.uk needs only a DNS record. The server’s default domain can only set JavaScript cookies.

Safari’s rules decide which matters. WebKit deletes cookies created in JavaScript after 7 days without interaction on your site, and caps cookies set in responses from a third-party CNAME or IP address at 7 days too. A subdomain pointed by CNAME at a host’s domain is that case. Same origin avoids it.

A server that only forwards hits doesn’t change who writes _ga. That changes when the GA4 client’s cookie setting moves from JavaScript Managed to Server Managed, and the server sets its own ID cookie. Google’s server-side course starts on JavaScript Managed, and the migration plan switches it last, with the option that keeps returning visitors’ existing IDs.

Default: same origin if your developer or CDN can route a path; otherwise a subdomain on an A record rather than a CNAME to a vendor’s domain. WebKit doesn’t publish its IP test, so ask the host how the server’s address relates to your site’s. Cookie switch dated, after the platforms have moved. Google tag gateway does not change this line, which is the whole of the Safari and gateway note.

Google’s server-side consent guide says you only set consent mode up in the web container: the Google tag adds the visitor’s choices to each request, and Google’s tags in the server adjust what they send. That covers GA4 and Google Ads.

It doesn’t cover Meta or any other tag in the server. Those need a trigger condition you build on the consent state that arrives, and a test session with the banner declined proves it. A server is not a route around the banner; it recovers signal from visitors who agreed. Consent wiring end to end is chapter 03, and the server part step by step is in Consent Mode v2 with server-side GTM.

Default: one banner, one consent set-up in the web container, a written gate on every non-Google server tag, signed off by whoever answers for privacy.

Decision 7: who hosts it, and who keeps it running?

A server container is a service with uptime, not a tag. On Google Cloud Run, Google’s guide recommends at least two instances to reduce the risk of losing data in an outage, says autoscaling 2 to 10 servers handles about 35 to 350 requests a second depending on the tags, and asks you to update the server at least for each major version, since updates carry security fixes. Preview needs its own server.

The spec names one person for four jobs: applying updates, setting the upper instance limit before peak trading, an alert when the server errors, and the domain and DNS record. On a managed host the vendor takes some of that, never all. Who maintains what on each host splits it out.

Default: Cloud Run if someone already looks after your Google Cloud project; a managed host if nobody does. Either way, a name on line 7, and the business owns the accounts.

How do you know the server did what the spec said?

Read the same numbers as line 1, four weeks after the last platform moved, with the change dates written next to them:

  • Orders against platforms: the GA4, Google Ads and Meta shortfall against paid orders. It should narrow towards the target in line 1. It won’t reach zero.
  • Safari against Chrome: the New users to Active users ratio. If the GA4 cookie has moved to the server, Safari’s ratio should come closer to Chrome’s.
  • Meta: Event Match Quality on Purchase, and whether server events show alongside browser events.
  • Google Ads: the Enhanced Conversions diagnostics on the purchase action.
  • Duplicates: platform purchases above store orders on any day is a missing key from line 4.

A sudden rise in GA4 users after a switch is its own diagnosis, in GA4 sessions or users jumped after server-side GTM. A sudden fall is in server-side GTM errors.

Which changes reopen the spec?

Exhibit C: changes and the line they put at risk

ChangeLine at riskCheck
New ad platform or event3, 4Dedup key and consent gate on the new tag
Checkout, theme or confirmation page change4Test order: transaction ID, event ID, email in the data layer
New banner or consent settings6Declined session in server Preview
Domain, CDN or DNS change5Set-Cookie from your own domain in Safari
Peak trading coming7Instance limit and alert, a week before
Server update prompt from Tag Manager7Update, then Preview and a test order

What doesn’t the spec recover?

Visitors who decline consent stay declined; advanced Consent Mode lets Google model part of them, and that is F-201 ‘s territory. Content blockers that stop the page’s scripts stop the event before the server sees it, so blocking narrows rather than ends. Wrong values, wrong counting settings and broken attribution routes are the same with or without a server: fix them in chapter 04 and chapter 05 first. A server carries what the browser hands it, faster and under your control. It does not make bad data good.

Also filed as

  • how to plan a move to server-side tracking
  • server-side tracking plan before build
  • what to decide before setting up server-side gtm
  • server-side gtm requirements checklist
  • server-side tagging scope document
  • which events to send through server-side gtm
  • who maintains server-side gtm after launch

Faults explained here

Sources

  1. Google tag platform: An introduction to server-side tagging (a server container runs on a server you control, not in the browser; only you have access to the data in the server until you choose to send it elsewhere; clients claim requests; checked 16 Nov 2026)
  2. Google tag platform: Map server-side tagging to a custom domain (same origin is best practice; subdomain needs DNS only; the default domain can only set JavaScript cookies; checked 16 Nov 2026)
  3. Google tag platform: Set up Google Ads conversion tracking with server-side tagging (GA4 client in the server container; GA4 event tag in the web container sends key events; Conversion Linker in the server container; transaction ID, value and currency; enhanced conversions need email or phone_number in user_data, pre-hashed keys start sha256_; checked 16 Nov 2026)
  4. Google tag platform: Implement consent mode with server-side Tag Manager (set up consent mode in the web container only; the Google tag adds consent parameters to the request; Google product tags in the server are consent-aware; checked 16 Nov 2026)
  5. Google tag platform: Cloud Run set-up guide (a minimum of 2 instances recommended to reduce the risk of data loss; autoscaling 2-10 servers expected to handle 35-350 requests per second; update at least for each major version, updates carry security fixes; preview server provisioned separately; checked 16 Nov 2026)
  6. Google tag platform: Server-side tagging fundamentals, configuring the GA4 data stream (GA4 client cookie set to JavaScript Managed at the start; server-managed cookie set up later; checked 16 Nov 2026)
  7. Google tag platform: Set up Google tag gateway for advertisers (the site loads the Google tag from your first-party domain; some measurement requests are sent to Google through it; checked 16 Nov 2026)
  8. WebKit: Tracking Prevention (cookies created in JavaScript deleted after 7 days without user interaction; cookies set in responses from third-party CNAME or IP address cloaking capped at 7 days; checked 16 Nov 2026)
  9. Analytics Help: Minimize duplicate key events with transaction IDs (purchases with the same transaction ID are deduplicated; checked 16 Nov 2026)
  10. Google Ads Help: Use a transaction ID to minimize duplicate conversions (deduplication within the same conversion action; checked 16 Nov 2026)
  11. Meta for Developers: Handling duplicate Pixel and Conversions API events (identical when ID and name match; later events within 48 hours discarded; fbp or external_id alternative; checked 16 Nov 2026)
  12. Meta for Developers: Conversions API best practices (use the Conversions API in addition to the Pixel and share the same events; Event Match Quality out of 10 per event in Events Manager; refresh fbp and fbc values regularly; checked 16 Nov 2026)
  13. Shopify Help Center: Meta data sharing (Enhanced and Maximum use the Conversions API as well as the Meta pixel; checked 16 Nov 2026)
WHO RUNS IT

Baris Asa, a London tracking specialist working as Synctag, writes the seven-line spec with you, builds the server in your own Google Cloud or host account and hands back the numbers it was judged on. For ecommerce brands and the agencies behind them.

Server-side tracking →