Skip to content

Tracking/Server-side tracking

Server-side tracking set up on your own domain

Browser tags lose data to ad blockers, Safari's cookie limits and slow pages. We set up server-side Google Tag Manager on a subdomain of your site, so events are collected first-party and you decide exactly what Google, Meta and the rest receive.

Data flowin / via / out
  1. Captured from

    • Website and checkout
    • Order and CRM webhooks
  2. Processed in

    • Server GTM on data.yourdomain.com
  3. Sent to

    • GA4
    • Google Ads
    • Meta CAPI
    • TikTok Events API
Typical timeline
1 to 3 weeks
Works with
Server GTM, Stape, Google Cloud Run
Pricing
Quoted after a short call
You keep
Full access and documentation

01/Server-Side Tracking, in short

Server-side tracking moves your tags from the visitor's browser to a tagging server on your own subdomain, such as data.yourdomain.com. The browser sends one first-party request, and the server forwards cleaned, consented data to GA4, Google Ads, Meta and TikTok. You recover conversions lost to ad blockers and Safari, and control exactly what each vendor receives.

02/Where it breaks

What we usually find first

  1. 01Ad platforms report fewer conversions than your store or CRM
  2. 02Returning Safari visitors show up as new users after 7 days
  3. 03Five or six vendor scripts slow every page down
  4. 04Nobody can say exactly what data leaves the site
  5. 05You tried sGTM once and it was never finished

When it's done

More of your real conversions reach the ad platforms, pages carry less JavaScript, and you control every field each vendor receives.

03/What you get

What the server-side setup includes

01
Server GTM container
Hosted on Stape, Google Cloud Run or AWS, sized for your traffic, with a staging environment.
02
Your own tracking subdomain
Something like data.yourdomain.com with DNS and SSL, so requests and cookies are first-party.
03
GA4, Meta, Google Ads and TikTok tags
Routed through the server container, with browser and server events deduplicated.
04
Longer-lasting cookies
Server-set first-party cookies that keep returning visitors attributed correctly.
05
Data clean-up before it leaves
IP masking, removal of personal data from URLs and per-vendor rules on what gets sent.
06
Monitoring
Uptime and error alerts on the server container, so you know the day something breaks.

04/Under the hood

One browser request, four destinations

The web container sends a single GA4 request to your subdomain. Server-side tags fan it out.

One browser request, four destinations

JavaScript
// Web container: GA4 tag points at your own subdomaingtag('config', 'G-XXXXXXX', {  server_container_url: 'https://data.yourdomain.com'}); // Server container: one incoming purchase event becomes//   GA4              -> purchase//   Google Ads       -> conversion + enhanced conversion data//   Meta CAPI        -> Purchase  (event_id shared with the pixel)//   TikTok Events API -> CompletePayment// with IP truncated and PII removed from page URLs first.

IDs are placeholders. In your project this lives in your own accounts, with a written note on what it does and how to change it.

05/Side by side

Browser-only tags vs server-side

Browser-only tags vs server-side
Ad blockersMany requests to google-analytics.com or facebook.com are blockedRequests go to your own subdomain, so far fewer are blocked
Safari cookiesJavaScript cookies capped at 7 days, or 24 hours in some casesServer-set first-party cookies that last as long as you allow
Data controlEach vendor script collects what it wantsYou choose every field each vendor receives
Page speedFive or six vendor scripts on every pageOne lightweight tag in the browser

06/Process

Three steps, in this order

  1. 01

    Check what you lose today

    We compare platform conversions with real orders or leads to size the gap before building anything.

  2. 02

    Build and test in staging

    The server container, subdomain and tags are built on a preview environment and checked request by request.

  3. 03

    Go live and compare

    We switch traffic over, then compare numbers for two weeks and hand over full access and documentation.

07/Who it's for

A good fit if you are

  • E-commerce stores spending on Meta and Google Ads
  • Lead-gen sites where every form fill counts
  • Teams with strict privacy or data-sharing rules

Tools we work in

Server GTM / Stape / Google Cloud Run / AWS / GA4 / Meta CAPI / Google Ads / TikTok Events API

Sounds like you? We look at your current setup on a call and tell you what we'd fix first, whether or not you hire us.

Book a call

08/Questions

Server-Side Tracking: common questions

What is server-side tracking?

Instead of each vendor's script sending data straight from the visitor's browser, events go to a tagging server on your own subdomain first. That server then forwards a cleaned-up version to GA4, Meta, Google Ads and others. Because the request is first-party, fewer events are blocked and cookies last longer.

Do I still need the browser tags?

Usually a light version, yes. A single GA4 or data tag in the browser sends events to your server container, and the server handles the rest. For Meta and TikTok we often run browser and server events side by side with a shared event ID, which gives the best match rates.

How much does hosting a server container cost?

For most small and mid-size sites it is between $20 and $100 a month on Stape or Google Cloud Run. High-traffic stores pay more. We size the hosting during the audit so there are no surprises.

Will server-side tracking get around consent rules?

No, and it shouldn't. Consent still applies. We connect Consent Mode v2 and your cookie banner to the server container so events are only sent where the visitor has agreed.

How long does a server-side setup take?

A typical setup takes one to three weeks, depending on how many platforms and how much custom data is involved. That includes a comparison period after launch.

Talk to a specialist about Server-Side Tracking

Tell us what you're running and what doesn't add up. We'll tell you what we'd check first, usually on a 30 minute call.