New: weekly live session, "The Hidden Leak: Where Your Ad Budget Disappears". Save a seat

Updated

Advanced website tracking

Make Every Marketing Decision With Accurate, Reliable Data

Our server-side tracking setup moves your measurement onto your own subdomain, so Google, Meta, TikTok and LinkedIn get cleaner, consent-checked, deduplicated events, and your reports finally sit close to your real orders and leads.

  • browser
  • data.yourbrand.com
  • GA4 · Ads · CAPI
Server-side tracking setup for a sample brand: a server container on a first-party subdomain receiving a purchase event with event ID, profit value and consent state, then forwarding it to GA4, Google Ads, Meta, TikTok and LinkedIn, with a daily event parity panel
The basics

What Is Server-Side Tracking?

Server-side tracking is a measurement setup where your website sends each event once to a server container you control, usually server-side Google Tag Manager on a subdomain like data.yourbrand.com, which then decides what to forward to GA4, Google Ads, Meta and other platforms.

In a browser-only setup, every platform loads its own script and takes whatever the browser allows, which is why GA4, Meta and Shopify rarely agree. A server-side tracking setup does not create conversions. It stops you losing real ones and puts you in charge of what each vendor receives. It also forwards broken events faithfully, so the basics come first.

Start with a sister service if…

Sample architecture diagram comparing browser-only tracking, where five vendor scripts send separate copies, with server-side tracking, where one stream goes to the brand's subdomain, is enriched and consent-checked, then sent to ad platforms
Browser vs server, simplified. A light browser tag usually stays in place so platforms can deduplicate.
Honest expectations

Does Server-Side Tracking Bypass Ad Blockers?

Partly. Requests to your own subdomain are blocked less often than requests to well-known tracking domains, so you usually recover some lost events. Some blockers still catch first-party setups, and nothing on the server should override a visitor who refused consent. Treat it as resilience, not a loophole.

ProblemDoes server-side fix it?What actually fixes it
Ad blockers stopping vendor scriptsPartlyFirst-party subdomain or Google tag gateway, plus Conversions APIs
Safari ITP shortening cookie lifeMostlyServer-set cookies on a subdomain whose IP matches your site
Visitor declined cookiesNoNothing should. Google’s consent modelling fills some gaps
iOS App Tracking Transparency opt-outsNoHashed email and phone as match keys
Same order counted twiceYes, if built rightOne shared event_id on browser and server events
Wrong or missing order valuesNoA correct data layer
Too many scripts slowing the siteYesVendor tags moved to the server
Architecture

How Does Server-Side GTM Work?

Server-side GTM adds a second container that runs on a cloud server, typically Google Cloud Run or a managed host, mapped to a subdomain of your site. Your web container sends one stream of events to it; “clients” inside the server container read the requests, and server tags forward clean versions to each platform.

Google’s server-side Tag Manager documentation covers the parts. We build and document these five.

  1. Web container

    The Google tag and a lean data layer.

  2. Server container

    At least two instances, with logging on.

  3. Subdomain

    data.yourbrand.com, or a same-origin path.

  4. Clients and tags

    The GA4 client receives; server tags forward.

  5. Lookups

    Margins and customer flags, never exposed.

What is first-party tracking, and why do cookies matter?

First-party tracking means the data is collected on your own domain and the cookies belong to your site. Safari caps cookies written by JavaScript at seven days, and since Safari 16.4 it can cap server-set cookies too when the tracking server’s IP address does not match your site. So the hosting choice decides how long cookies last.

We confirm cookie lifetime in a real Safari session, not a diagram.

What is the Google tag gateway?

Google tag gateway for advertisers serves the Google tag and its measurement requests through your own domain, using your CDN or load balancer, such as Cloudflare or Google Cloud. It is a lighter step than full server-side GTM and covers Google’s tags only, with no server-side enrichment or Conversions APIs.

Google only? The gateway can be enough. Add Meta, TikTok or LinkedIn and a full server container usually wins.

Platforms

Server-Side Conversions API for Meta, TikTok, LinkedIn and Google

Each platform has its own endpoint and its own rule for matching server and browser events, so nothing counts twice. The Meta Conversions API documentation and the TikTok and LinkedIn developer guides set these rules; this is how we apply them.

PlatformServer endpointDeduplicationMatch keys we send (hashed)
MetaConversions APISame event_name and event_id as the PixelEmail, phone, external ID, plus fbp and fbc cookies
TikTokEvents APIShared event_id with the TikTok PixelEmail, phone, external ID, ttclid
LinkedInConversions APIShared event ID with the Insight TagEmail, plus the first-party li_fat_id click ID
Google AdsServer conversion tag with enhanced conversionsTransaction ID on every purchaseEmail, phone, address, plus gclid, gbraid or wbraid

B2B brands can also send CRM deals back as offline conversions; see SaaS campaign management.

Enrichment

What Data Can You Add on the Server?

The server can add data the browser should never see: product margin, whether the buyer is new or returning, predicted lifetime value and stock status. It can also remove data that should never leave, such as emails sitting in page URLs. Ad platforms then optimise on business value, not just checkout totals.

Browser sentsample
event: "purchase"
event_id: "ord_58213"
value: 142.00
currency: "USD"
page_location: ".../thanks?email=ana@mail.example"
items: [ "HX-TENT-2P", "HX-MAT-01" ]
Server forwardssample
event: "purchase"
event_id: "ord_58213"
value: 142.00
currency: "USD"
page_location: ".../thanks"
profit_value: 61.40new_customer: trueltv_band: "high"user_data.em: sha256(...)

Struck line removed on the server. Highlighted lines added from a margin and customer lookup. Fictional order.

Should you bid on profit instead of revenue?

Often, yes, if your margins vary a lot between products. Sending profit as the conversion value lets Target ROAS chase money you keep, not volume on low-margin items. The trade-off: platform ROAS figures drop, so everyone reading the reports needs to know what the value now means.

New customers and lifetime value

A server lookup against your customer list tells Google Ads who is new, so it can bid more for them. For repeat-purchase brands on our ecommerce marketing accounts, an LTV band beats a single order value.

Privacy

How Do You Enforce Consent on the Server?

Your consent banner sets the four Consent Mode v2 signals in the browser, and those signals travel with every event to the server. Each server tag then checks them again before firing, so a declined visitor is never forwarded to Meta, TikTok or LinkedIn, and Google only gets what Consent Mode permits.

  • Gate 1: signals inAll four Consent Mode v2 signals read from every request.
  • Gate 2: tag rulesEvery server tag fires only on the consent state it needs.
  • Gate 3: data outEmails hashed, IPs trimmed, sensitive URL parameters removed.
  • Gate 4: regionServer location matched to your customers, documented.
Warehouse

BigQuery, Data Warehousing and Attribution Modelling Basics

Every platform claims credit for the same sale. A warehouse holds one copy of the truth: GA4’s BigQuery export, server events streamed from sGTM, and orders or CRM deals joined on a transaction ID. Attribution modelling then becomes a question you answer with your data, not a dashboard setting you accept.

Standard GA4 properties can export up to one million events a day to BigQuery, plus a streaming option. First click, linear, time decay and position-based models were retired in Google Ads and GA4 in 2023, leaving data-driven attribution as the default and last click as the alternative. Here is how the main approaches compare.

MethodQuestion it answersWhat it needsUse it when
Data-driven attributionWhich Google clicks get credit?Clean conversion events in Google Ads or GA4Day-to-day bidding and reporting
Multi-touch attribution (MTA)Which cross-channel paths lead to sales?User-level paths in a warehouseChecking overlap, with consent gaps
Marketing mix modelling (MMM)What does each channel add over months?Usually two to three years of weekly spend and sales dataPlanning across channels; Google Meridian and Meta Robyn are open-source options
Incrementality testingWould these sales have happened without the ads?A holdout or geo test, or a platform Conversion Lift studyProving a channel is truly adding sales
Monitoring and QA

Server-Side Tracking Monitoring: What We Check and When

Tracking breaks quietly. A checkout app update can halve purchase events overnight while platforms keep bidding on the broken numbers.

Sample tracking monitor showing daily store orders against server purchases, a Friday gap after a checkout app update, alerts by priority, a Meta deduplication rate and the share of visitors granting consent
  • DailyServer purchases or leads against real orders or CRM records.
  • DailyServer container errors and response codes from each platform.
  • WeeklyMeta Event Match Quality, deduplication and enhanced conversions diagnostics.
  • WeeklyConsent rate by region.
  • Every releaseA real test order through Preview on both containers.
  • QuarterlySafari cookie lifetime and what each vendor receives.
Process

Our Server-Side Tracking Setup, Step by Step

Each step names who does the work, so your developer knows when they are needed.

  1. Audit what exists

    Read-only access everywhere. A week of orders matched against every report.

    EmergingAds
  2. Agree the event plan

    Events, values, platforms, and what counts as a real sale.

    Both
  3. Fix the data layer

    Order IDs, values and customer fields pushed reliably on every key page.

    Your developer, our spec
  4. Deploy the server

    Server container in your cloud account, plus DNS.

    EmergingAds, one DNS change from you
  5. Build server tags

    GA4, Google Ads, Meta, TikTok and LinkedIn, with consent rules and event IDs.

    EmergingAds
  6. Add enrichment

    Margin, new customer and LTV lookups, only where they will change bidding.

    Both
  7. Run in parallel

    Old and new side by side, checked daily against real orders.

    EmergingAds
  8. Hand over and monitor

    Documentation, access in your name, and the monitoring runbook above.

    EmergingAds
Proof

What Two Real Accounts Taught Us About Tracking

EmergingAds is a performance marketing agency founded in 2021 in Gurugram, India, working with 85+ brands across the US, UK, UAE, India and Australia. Neither case below is a server-side build. Both show why the counting has to be right before anything else.

NetNutri · Google Ads · US supplements

220,674 “conversions”, 10,271 purchases

NetNutri Google Ads report figures drawn to scale: 220,674 in the conversions column, 124,607 add to basket and 10,271 purchases

NetNutri’s Google Ads report showed 220,674 conversions because the column counted add to basket and other actions. We track purchases as their own column and steer by them: 10,271 purchases and $794,281 in conversion value, 2.21x per dollar, from Shopping and Performance Max.

Read the NetNutri supplement Google Ads case study →
Shot Vet · Meta + Google · USA

Fixed tracking first, then scaled

Shot Vet’s Meta ads were running on broken conversion tracking. We repaired the data before touching campaigns, then rebuilt Meta and added Google.

10,000+leads
$18cost per lead
2x+lead volume

In under 3 months, per the case page, which describes a tracking repair, not a server-side build. More in healthcare marketing.

Read the Shot Vet case study →
FAQs

Advanced Tracking: Frequently Asked Questions

Is server-side tracking worth it for my business?

Usually yes, if you advertise on two or more platforms and sell or capture leads online. A server-side tracking setup then gives you fewer lost events, one deduplicated stream and control over what each vendor receives. On Google alone with modest traffic, the Google tag gateway and enhanced conversions may be enough.

How long does server-side tracking take to set up?

Typically 10 to 14 working days for a full build, plus about a week of parallel running. Data layer fixes are the usual cause of delays.

Why is my GA4 data different from my ad platform reports?

Because each tool counts differently: attribution models, conversion windows, consent and duplicates all differ. Server-side tracking narrows the gap but never fully closes it.

Does server-side tracking work without cookie consent?

No, and it should not. Consent signals travel to the server and every tag respects them. For Google, Consent Mode v2 can model some of the conversions you cannot observe.

What is the difference between server-side GTM and the Google tag gateway?

The gateway only routes Google’s tags through your domain. Server-side GTM is a full server container that can enrich, filter and forward events to Meta, TikTok, LinkedIn and others as well.

Do I still need the Meta Pixel if I use the Conversions API?

Yes, in most setups. Meta recommends running both with a shared event ID, so it deduplicates and keeps browser-only signals.

Does server-side tracking work on Shopify?

Yes. Shopify’s Customer Events can pass checkout events to your server container, and order webhooks can confirm purchases from the backend.

Who owns the server container and the data?

You do. The container, cloud project and BigQuery dataset sit in your accounts, and we work with access you grant.

Can you send offline or CRM conversions as well?

Yes. Qualified leads and closed deals from your CRM can go back to Google Ads, Meta and LinkedIn, so bidding learns from revenue instead of form fills.

Do I need marketing mix modelling?

Not until you run several channels steadily for years. Most brands get more from clean tracking plus one incrementality test.

POST/free-ad-audit/→ 200 OK

Ready to Make Decisions With Accurate Data?

Book a free tracking audit. We compare your platform numbers with your real orders or leads and list what to fix first.

audit.scope
GTM, GA4, Google Ads, Meta, TikTok, LinkedIn
audit.output
A prioritised fix list, browser and server
Client testimonials

Real Brands. Real Results.

What founders and marketing leads say after working with us.

5.0from verified clients
Verified client
“Generating over $500k+ per month for my Kids clothing brand.”
↑ $500K+ monthly revenue
Anthony CampoFounder, The Simple Seed Baby
Verified client
“Generating over $20K per month for my courses.”
↑ $20K+ monthly revenue
Caterina CiacataniFounder, Sixty Social Seconds
Verified client
“EmergingAds helped me generate qualified leads for my Online Yoga Coaching Business consistently.”
↓ Consistent qualified leads
Lilith MoonFounder, Shamanic Yoga
Verified client
“The audit found $4,200 per month in wasted spend across three Paid campaigns we assumed were performing.”
↓ $4,200/mo wasted spend found
PrimeWeldE-Commerce Director, USA
Verified client
“The audit identified three structural problems in our Meta campaigns we had lived with for months.”
↓ 44% cost per lead reduction
Oak TravelMarketing Lead, UK
Verified client
“Piyush and the team helped me grow my business in the early stages.”
↑ Business scaled from early stage
Mellissa RickerFounder, Engineered to Scale
Verified client
“The EmergingAds team generated ticket sales for our event through a focused digital campaign.”
▶ Event ticket sales delivered
Michael DynanDirector, Design Mumbai
Chat on WhatsApp
ROAS checkFree Ad Audit