Server-side tracking for online shops: what it fixes
Server-side tracking means your shop’s events reach Meta, TikTok, GA4 and Google Ads from a server, not only from the shopper’s browser. The purchase can come from your shop’s own server when the order is paid. The browser events can go through a subdomain of your shop instead of straight to the platforms. Both close gaps that browser tags leave open. Neither removes the need for consent.
This guide covers the whole picture at a high level. Each section links to an article that goes deeper.
In this guide
- How it differs from a pixel
- Where orders go missing
- What a server copy fixes, and what it doesn’t
- Counting each order once
- Consent
- What each platform receives
- Your own subdomain
- How to check it works
- Ways to set it up
Deep dives: GA4 shows fewer orders than WooCommerce, Meta Pixel and Conversions API deduplication, server-side tracking for WooCommerce, Consent Mode v2 and server-side tracking, IAB TCF or Google Consent Mode, paid orders that never reach the thank-you page.
How it differs from a pixel
A pixel is a script on your pages. When the shopper’s browser loads the thank-you page, the pixel sends Purchase to Meta (or TikTok, or Google). Everything depends on that browser: whether it loads the page, whether it lets the request through, whether it still has the cookie from the ad click.
Server-side tracking adds two paths:
- From your shop’s server. When the order is paid, the shop itself sends the purchase. For Meta that’s the Conversions API, for TikTok the Events API, for GA4 the Measurement Protocol, for Google Ads the Data Manager API. No page has to load.
- From the browser, through your domain. The tracking script and its events use a subdomain of your shop, for example
rk4vqz.yourshop.com, and a server forwards to each platform the events it accepts (the table below).
When a pixel stays on your pages too, the purchase arrives twice, from the browser and from the server. The platforms then need a way to count it once, which is the next big topic.
Where orders go missing
Three causes open gaps between your shop and your ad reports:
- Blocked requests. Ad blockers and privacy filter lists block mostly by the tracking provider’s host. The page loads, but the pixel’s script or its request to the provider is blocked.
- No thank-you page. A shopper pays in a payment gateway and doesn’t come back, or pays a traditional transfer days later. The pixel never fires. Details in paid orders that never reach the thank-you page.
- Short cookies in Safari. Safari keeps cookies written by JavaScript for up to 7 days (24 hours after a click from a tracking domain), and cookies set by a server for 7 days too when that server’s IP address differs from your site’s. A shopper who clicks an ad and buys two weeks later arrives without the click.
The first two take the whole purchase. The third keeps the purchase but loses the link to the ad.
What a server copy fixes, and what it doesn’t
A purchase from your server fixes the first two causes for shoppers who gave consent: nothing in the browser can block it, and it doesn’t wait for a page.
It doesn’t fix everything:
- Consent stays. If there was no consent for ad cookies at checkout, the server must not send the purchase to ad platforms either. Server-side tracking isn’t a way around the cookie banner.
- Attribution needs identifiers. The server copy carries what the browser saved at checkout: the click IDs, the
_fbpcookie, the_gaidentifier, plus a hashed email and phone. Without any of them most platforms won’t take the purchase at all (GA4 needs the_gaidentifier), and one that is sent can still fail to match a campaign. - Refunds depend on the platform. Meta and TikTok accept no refund events, so their revenue stays higher than your shop’s. GA4 takes a refund from the server. Google Ads lowers the value of a conversion it already has for that transaction ID.
Counting each order once
When the browser and the server both send a purchase, the platforms need to recognise them as one:
- Meta and TikTok match on the same
event_idand event name, within 48 hours. Meta merges a Pixel copy with a Conversions API copy, but never two server copies. - GA4 and Google Ads match on the transaction ID.
So the browser and the server must use the same IDs, and only one integration may send the server copy. Two plugins each sending Conversions API purchases count every order twice in Meta. TallyHost sends both copies through the platforms’ APIs, so it decides itself: the browser purchase waits up to 15 minutes and goes out only if the server copy didn’t. How Meta matches the two copies covers the setups that still double-count.
Consent
Your cookie banner decides. With Google Consent Mode v2 it sets four signals (ad_storage, ad_user_data, ad_personalization, analytics_storage), and each platform needs a different combination: Meta and Google Ads go out with ad storage and ad user data, TikTok needs personalisation too, GA4 needs analytics consent only. IAB TCF adds consent per vendor. Once it decides, even next to Consent Mode, TikTok gets nothing, because its pixel has no vendor on the list, and Meta needs Google’s Additional Consent. IAB TCF or Google Consent Mode explains why.
For a purchase from the server the decision has to be saved at checkout, because the server sends it later, when the shopper may be gone. Consent Mode v2 and server-side tracking has the full table.
What each platform receives
| Platform | From the browser | From your server |
|---|---|---|
| Meta (Conversions API) | Page views, product views, add to cart, checkout; purchase as a fallback | Purchase; refunds aren’t accepted |
| TikTok (Events API) | Product views, add to cart, checkout; purchase as a fallback | Purchase; refunds aren’t accepted |
| GA4 | Nothing: your own gtag keeps the session | Purchase and refund (Measurement Protocol) |
| Google Ads | Purchase as a fallback | Purchase, and a refund as a value adjustment |
“Fallback” means the browser purchase goes out only when the server copy didn’t arrive in 15 minutes. GA4 is the odd one out: the Measurement Protocol is meant to add server events to a session the browser started, not to replace gtag. It also answers “success” even when the API secret is wrong, so check new setups in DebugView.
Your own subdomain
Filter lists block mostly by the tracking provider’s host, and also by known paths and subdomain labels such as analytics. or track.. A script and events served from a neutrally named subdomain of your shop are first-party requests, so a rule written for a provider’s domain doesn’t match them. That matters for the server purchase too: consent for it is saved by that script, so a blocked script means a purchase without consent. With TallyHost the subdomain is part of installation: you add a few DNS records (A, AAAA and a TXT check), and the script is only served from your domain.
With consent, the identity cookie is then set by a server on your domain. That still counts as “different IP” in Safari, so the WooCommerce plugin can renew the same cookies from your shop’s own server (an optional same-IP mode), which keeps them for their full lifetime there.
How to check it works
- Accept everything in the cookie banner and place a test order. Each platform should get the purchase once.
- Reject everything and place another. Nothing should reach the ad platforms.
- In WooCommerce, pay one order with a method that leaves the shop (a gateway, a transfer) and don’t return to the thank-you page. The purchase should still arrive, from the server.
Use each platform’s test tools (Test Events in Meta, DebugView in GA4) and keep test orders few; Meta still counts events sent with a test code. In TallyHost, the debugger shows every event, its consent and each platform’s answer.
Ways to set it up
- A plugin or app for your platform. For WooCommerce, the TallyHost plugin sends the purchase and refunds from your server and adds the script from your subdomain. For Shoper, an app from the Shoper App Store reports paid orders from Shoper’s webhook [● available after the App Store review, S4-01]; its consent comes from the purchase on the thank-you page, so an order whose shopper never returns is counted but not sent. Other platforms can use the script, and sign purchases from their own server.
- Server-side Google Tag Manager. A server container you configure yourself, self-hosted or on a hosting service. It moves the browser’s requests to a server; purchases from your backend take extra work, for example a webhook. TallyHost compared with server-side GTM goes through the differences.
Whatever you pick, the questions are the same: does the purchase start from the paid order, is consent saved at checkout, and do the browser and server share one ID. The integrations page lists what TallyHost sends to each platform.
Platform documentation behind this guide: Meta on deduplicating Pixel and server events, Google on TCF strings and Consent Mode, WebKit on tracking prevention.
Send your shop's orders from the server
TallyHost reports paid orders with consent checked, to Meta, TikTok, GA4 and Google Ads. Free up to 100,000 events a month.
Start free