Server-side tracking guide

Server-Side Tracking: What It Is, How It Works, and Expert Setup

Server-side tracking sends your conversion data from a server you control (usually a server Google Tag Manager container on your own subdomain) to Google Ads, Meta and GA4, instead of relying only on browser pixels. It recovers events lost to ad blockers and Safari's cookie limits, and gives you control over what each platform receives.

I have set this up for 250+ businesses and agencies. Most setups are live within a few days.

Updated November 2026 · By Abdul Kayium

What is server-side tracking?

With normal tracking, every ad platform puts its own script in your visitor's browser. The Meta Pixel, the Google Ads tag, GA4 and TikTok each load, set cookies and send data straight from the browser to their own domains. That worked well for years. It works less well now.

Ad blockers block those domains. Safari and Firefox cut the life of cookies set by JavaScript to seven days or less. Consent banners, slow phones and people closing the tab before a tag fires all chip away at the numbers. On most stores I audit, GA4 and Meta see somewhere between 60% and 85% of real orders.

Server-side tracking adds a middle step. The browser sends one stream of events to a server on your own subdomain, for example track.yourdomain.com. That server, usually a server-side Google Tag Manager (sGTM) container, then forwards the events to each platform through its API: the GA4 Measurement Protocol, Google Ads, the Meta Conversions API, the TikTok Events API and so on.

Client-side vs server-side tracking

Client-side (browser pixels only)Server-side (sGTM on your subdomain)
Data lossOften 15% to 40% lost to ad blockers, ITP and failed tagsMuch lower; most of the gap is recovered
Cookie lifetimeJavaScript cookies capped at 7 days (or 24 hours) in SafariServer-set first-party cookies can last months
Page speedSeveral heavy third-party scriptsFewer scripts in the browser, work moved to the server
Control over dataEach vendor collects what its script wantsYou decide what each platform gets; you can redact PII
Running costFreeA monthly hosting fee (Stape has a free tier)
ComplexityLow; paste tags or use an appMedium; DNS, a server container and deduplication

For a deeper look at the accuracy side, read server-side vs client-side accuracy.

What it fixes and what it does not fix

It fixes
  • Events blocked by ad blockers that target known tracking domains
  • Short cookie lifetimes in Safari and iOS, which break attribution after a week
  • Weak Meta Event Match Quality, by adding hashed email and phone
  • Missing purchases when the thank-you page does not load
  • Personal data you never meant to send to vendors
It does not fix
  • A broken data layer or wrong order values; bad data in means bad data out
  • Duplicate conversions, unless deduplication is set up properly
  • Visitors who refused consent; you still have to respect that
  • Wrong conversion settings in Google Ads or Meta
  • Leads that close offline; that needs offline conversion tracking

How server-side tracking works

Here is the flow I build on most projects. Your site keeps one light browser tag. Everything else happens on your server.

1. An event happens in the browser or comes from a webhook

A visitor adds to cart, submits a form or buys. The web GTM container picks it up from the data layer and sends it as a GA4 request. For purchases I often add a backend source too, such as a Shopify order webhook or a Stripe payment, so the order is counted even if the thank-you page never loads.

2. It is sent to your own subdomain

Instead of going to google-analytics.com, the request goes to track.yourdomain.com. Because it is your domain, most blockers leave it alone and the server can set long-lived first-party cookies. See first-party subdomain setup.

3. The server enriches and cleans it

The server container reads the event, adds what the browser could not send safely (hashed email and phone with SHA-256, click IDs such as GCLID, wbraid and gbraid, the fbp and fbc cookies), removes what should not leave your site, and checks consent state.

4. It is sent to each platform's API

Tags in the server container send the event to Google Ads, the Meta Conversions API, GA4 and TikTok. Each browser and server event shares an event_id so platforms count it once.

That last point is where most do-it-yourself setups go wrong. If the browser pixel and the server both send a purchase without a matching ID, Meta and Google count two sales. Your reports look great for a week, then Smart Bidding starts chasing ghosts. I cover the fixes in duplicate conversions after going server-side and common server-side tracking mistakes.

Testing matters just as much. I use server GTM preview mode, the Meta Events Manager test tool and Google Ads diagnostics, then compare a few days of real orders against the store backend before I call it done. After launch, request logs and simple alerts catch problems early; see sGTM monitoring and logging.

What it does for your ad platforms

Google Ads

Google Ads gets conversions through a server-side conversion tag plus enhanced conversions, with the GCLID kept in a first-party cookie that survives Safari. Smart Bidding sees more of your real sales, which matters most for Performance Max and Target ROAS. Full guide: server-side tracking for Google Ads. If you only need better matching, start with Google Ads enhanced conversions.

Meta Conversions API

This is where I see the biggest jumps. Running the Pixel and CAPI together, deduplicated by event_id, with hashed customer data, usually lifts Event Match Quality from 4 or 5 to 7 or above. Read Meta CAPI through server-side GTM or my Meta Conversions API service page.

GA4

GA4 events go through the server container, so you get longer cookie life, fewer lost sessions and the option to redact IP addresses or URL parameters. Guide: GA4 server-side tagging setup.

TikTok, Pinterest and LinkedIn

Once the server container is running, adding more platforms is cheap. The same events feed the TikTok Events API, the Pinterest Conversions API and LinkedIn's Conversions API.

Server-side tracking by platform

Shopify

Shopify's checkout runs in a sandbox, so browser tracking there is limited. I combine a custom pixel for browsing events with an order webhook for purchases, both sent to sGTM. Guide: Shopify server-side tracking setup.

WooCommerce

WooCommerce gives full control of the thank-you page and order hooks, which makes it easy to send purchases from both the browser and the server. Guide: WooCommerce server-side tracking.

Headless and custom builds

On headless stores and custom apps, I work with your developer on a clean data layer and send backend events straight to sGTM. See headless Shopify tracking.

What it costs

There are two costs: the one-off setup and monthly hosting for the server container. Hosting depends mainly on how many requests your site sends.

StapeGoogle Cloud Run
Typical monthly costFree tier, then a paid plan as traffic growsPay per use; depends on traffic and instances
Setup effortLow; a few clicks plus a DNS recordHigher; GCP project, scaling and billing
MaintenanceManaged for youYou handle updates and monitoring
ExtrasCustom Loader, Cookie Keeper, logs, bot detectionBuild them yourself
Best forMost small and mid-sized businessesTeams already on GCP or with strict data rules

More detail in server container costs explained and Stape vs self-hosted sGTM. My setup fees are on the pricing page.

Is it worth it for you?

Server-side tracking is worth it when lost data costs you more than the setup and hosting. That is usually true if:

It is usually not worth it yet if you spend very little on ads, your current browser tracking is already broken (fix that first), or you get only a handful of conversions a month. I wrote about both sides in is server-side tracking worth it, when not to use it and how to calculate the ROI.

A quick way to check: compare last month's purchases in your store or CRM with what Google Ads, Meta and GA4 report for the same dates. If the platforms are 15% or more below your real numbers, and most of the gap is on mobile Safari, server-side tracking will likely pay for itself. If the gap is small or random, the problem is usually somewhere else, and I will tell you that on the review call rather than sell you a setup you do not need.

Server-side tracking is not a way around consent. If a visitor refuses, the server must respect that. What changes is that you now sit between the visitor and the vendors, so you can do privacy properly: pass Consent Mode v2 signals (ad_storage, analytics_storage, ad_user_data, ad_personalization) through to Google, drop IP addresses, remove email addresses that leak into URLs, and only send hashed data where consent allows. See server-side tracking and Consent Mode and Google Consent Mode v2.

Results: case studies

More in all case studies, including SaaS tracking with ScalixAI.

How I set it up for you

I am a freelance conversion tracking specialist. I work directly with businesses and white-label for agencies such as ScalixAI, AdRock and Profitable Sites. Here is what a server-side setup with me looks like.

  1. Audit. I check your current tags, data layer, consent and how far your platforms are from your real sales.
  2. Subdomain. I give you one DNS record to add for track.yourdomain.com.
  3. Server GTM on Stape. I create and connect the server container, with Custom Loader and Cookie Keeper where useful.
  4. Platforms. GA4, Google Ads (with enhanced conversions), Meta CAPI and TikTok, as needed.
  5. Deduplication. Shared event_id and transaction IDs so nothing is counted twice.
  6. QA. Preview mode, platform test tools and real orders or leads checked against your backend.
  7. Monitoring and handover. A short report and a Loom walkthrough of what was set up.
What I need from you
  • Admin access to GTM, GA4 and the ad accounts
  • Access to your store or website admin
  • Someone who can add one DNS record
  • Your cookie banner or CMP login, if you have one
Timeline and price
  • Most setups: one to three working days
  • Server-side adds €300 (lead-gen) or €400 (ecommerce) to a base setup from €450
  • Hosting is paid by you directly to Stape
  • Full details on the pricing page
Abdul Kayium
Abdul Kayium

Conversion tracking specialist. 250+ clients, working with GTM, GA4, server-side tracking, Meta CAPI and offline conversions. Questions first? Get in touch.

Related guides

Other pillar guides: offline conversion tracking, Meta Conversions API and Google Ads enhanced conversions.

Waqas Khokhar
Waqas Khokhar Ex-Google · CEO @ScalixAI
From Whop Whop to Cluely Cluely and other high-growth brands, Abdul Abdul was our go-to tracking specialist

// client reviews

Waqas Khokhar · CEO ScalixAI
client review

Wall of love

Adélaïde De Vos
Adélaïde De Vos3,922 followers
LinkedIn

I had the pleasure to work with Abdul and I can say that he exceeded my expectations. Professional, patient, and clear in his explanations.

Tobias
Tobias7,030 followers
LinkedIn

Abdul set up our tracking for Google Ads and Meta Ads, which helped us get 20%+ more conversions on the same ad spend.

Victor Serban
Victor Serban6,520 followers
LinkedIn

Abdul delivered our first project in just 3 hours. 1.5 years and 30+ projects later, still the best tracking.

Kosta
Kosta8,730 followers
LinkedIn

3 hours to set up. 97%+ accurate data, exactly what we needed. Huge difference.

Donal O'Sullivan
Donal O'Sullivan9,937 followers
LinkedIn

We increased our data accuracy from 50-70% to 95%. Ads are working much better now.

David Friend
David FriendCEO, Profitable Sites
LinkedIn

Kayium set up accurate tracking that helped us scale ads fast and boost conversions by over 25%.

Lalita Sundari
Lalita Sundari7,924 followers
LinkedIn

His strategic mindset and expertise in GTM, GA4, Pixel & Server Side Tracking are invaluable!

Emmett
Emmett7,900 followers
LinkedIn

Abdul really knows his stuff. His tracking knowledge is seriously impressive.

Hasan
Hasan1,200 followers
LinkedIn

Our tracking was a mess. Abdul fixed it in under 24 hours, and everything finally matched.

NIk
NIk4,270 followers
LinkedIn

After Abdul’s setup, our tracking matched our actual sales by 95%+ with our backend CRM.

Server-side tracking FAQ

What is server-side tracking?

Server-side tracking sends your conversion data from a server you control, usually a server Google Tag Manager container on your own subdomain, to Google Ads, Meta, GA4 and other platforms through their APIs. The browser sends one request to your server, and the server decides what each platform receives.

Is server-side tracking the same as server-side tagging?

In practice, yes. Server-side tagging is Google's name for running tags in a server GTM container. Server-side tracking is the wider idea of sending conversion data from a server rather than only from browser pixels. Most people use the two terms for the same setup.

Does server-side tracking bypass ad blockers?

It recovers a large part of the data ad blockers remove, because requests go to your own subdomain instead of known tracking domains. It does not recover everything, and it should never be used to ignore a visitor who has refused consent.

Is server-side tracking GDPR compliant? Do I still need consent?

Yes, you still need consent. Server-side tracking does not change the legal basis. What it gives you is control: you can redact IP addresses, strip personal data and respect Consent Mode v2 signals (ad_user_data and ad_personalization) before anything reaches Google or Meta.

How much does server-side tracking cost per month?

Hosting usually costs between €0 and €20 a month on Stape for small and mid-sized sites, and roughly $50 to $150 a month on Google Cloud Run once you run the recommended minimum of instances. High-traffic stores pay more on either option.

Do I still need the browser pixel with Meta CAPI?

Yes. Meta recommends running the Pixel and the Conversions API together, sending the same event_id from both so Meta can deduplicate them. The pixel adds browser signals (fbp, fbc) and the server adds reliability and hashed customer data.

How long does a server-side tracking setup take?

A standard setup for GA4, Google Ads and Meta takes me one to three working days, including DNS, testing and handover. Simple lead-gen sites can be done faster; stores with several platforms and custom checkouts take longer.

Stape or Google Cloud: which should I host on?

For most businesses, Stape. It is cheaper at normal traffic levels, needs no cloud admin, and adds useful power-ups such as Custom Loader and Cookie Keeper. Google Cloud Run makes sense if you already run on Google Cloud, have an in-house engineer, or have strict data residency rules.

Let’s fix your tracking

Claim your free audit. I'll show you how much data you are losing and whether server-side tracking is worth it for you.

Chat on WhatsAppAvailable now • Replies in ~5 min