GuidesTrack and report

Server-side tracking: how to set it up

Server-side tracking sends events from a server you control to analytics and ad platforms, instead of every tag running in the visitor’s browser. For most sites that means a Tag Manager server container on your own subdomain, plus Meta’s Conversions API. It adds control and durability, not a way around consent.

Updated November 16, 20266 steps5 min read

Check my tracking →

$1 today. Cancel anytime before day 7.

Server-side tracking setup
  1. 1Decide which eventsPurchases and leads first, not every click.
  2. 2Create a server containerA second container of type Server, hosted in the cloud.
  3. 3Map a first-party subdomainServe it from your own domain.
  4. 4Send events to itRoute the web container’s tags through the server.
  5. 5Add platform tagsGA4, Google Ads, and Meta Conversions API.
  6. 6Test and deduplicateMatch event IDs so nothing counts twice.
On this page
  1. Client-side versus server-side
  2. Decide if it is worth it for you
  3. Create the server container
  4. Send events and add platform tags
  5. Problems that show up after launch
  6. Test and deduplicate
  7. Questions

Client-side versus server-side

In classic client-side tracking, the browser loads each vendor’s script and sends data straight to each vendor. In server-side tracking, the browser sends one stream to a server you control, and that server forwards events to the platforms you choose.

You gain control over what leaves your site, a lighter page, first-party delivery of the data, and the ability to add server-only information such as order margin. You do not gain a way around consent. The browser usually still has to send the original event, and the visitor’s choices still apply.

A common first step is to move only the tags that benefit most, such as GA4, Google Ads and Meta, and leave small tags in the browser. You can add more later once the server container is stable.

There is also a hybrid pattern that most sites end up with: the browser still collects the event and sends it to your server, which then fans it out. The browser is the source of the signal, so a visitor who blocks all scripts is still not measured.

Decide if it is worth it for you

It is worth the effort when you spend meaningfully on Meta or Google, when ad blockers and browser limits are cutting your conversion counts, or when you need to send sales that happen outside the browser. For a small site with a modest budget, a clean Tag Manager setup is the first job.

Server hosting has a cost, either your own cloud bill or a managed provider’s fee, and one more thing that can break. Budget for monitoring it.

The performance gain is real but modest. Fewer scripts in the browser mean less work on the page, which can help Core Web Vitals. See Core Web Vitals for what to measure.

Is your tracking counting every conversion?

Runs tracking health checks on your pixels and tags. Sends a weekly performance review.

Create the server container

In Tag Manager, create a new container and choose Server as the target platform. Google offers automatic provisioning in its own cloud, and you can also self-host or use a managed host. Production needs more than a test instance, so check the current guidance on the number of servers before launch.

Map a subdomain of your own site to the server, such as a name beginning with “metrics”. Serving from your own domain makes the requests first-party. Then add a GA4 client in the server container to receive the data.

Plan for ownership. Someone has to be responsible for the server’s uptime, its cost, and updating the container when platforms change their requirements. If that person does not exist, a managed hosting option may be a better fit than running it yourself.

Send events and add platform tags

In your web container, point the Google tag at your server address so events go to the server first. In the server container, add tags for GA4 and Google Ads conversions, and for Meta use the Conversions API tag or a direct integration. Platform steps are in Meta Conversions API.

On Shopify and similar platforms, the built-in integrations send server events for you. Use them for purchases and keep the Tag Manager setup for what the platform does not cover.

Send the highest-value events first: purchases, leads and sign-ups. Page views and scrolls can stay in the browser. Reducing what you route through the server keeps cost down and makes it easier to see what is working.

Problems that show up after launch

Duplicate events are the first. If a purchase fires from the browser and from the server without a shared event ID, platforms may count both. Check each platform’s diagnostics for deduplication after launch.

Missing parameters come next. Server events need the same value, currency and identifiers the browser sent, plus any matching fields such as hashed email where you have consent to use them. Events with thin data match poorly and help bidding less.

The last is cost and drift. A server container is infrastructure. Watch its error rate and its bill, and keep it updated. Set an alert when event volume drops, because a failed server can stop all tracking at once, which a failed browser tag never does.

Test and deduplicate

Use preview mode on both containers and the platforms’ own diagnostics. When the same event arrives from the browser and the server, send a shared event ID so the platform keeps one. Without it, a purchase can be counted twice and your cost per result looks better than it is.

Is it legal? Server-side tracking is a method, not a legal basis. Consent and notice rules apply the same way, so pass the visitor’s consent state to the server and respect it. Sprites can run a tracking health check on a schedule and flag duplicate or dropped events, with fixes proposed for approval.

Compare numbers before and after. Over two weeks, your platform counts should rise modestly where browser tracking had been losing events, not double. A big jump is usually duplication, and a drop means something is not arriving.

Keep notes on what you changed and when. If conversions move after the launch, you will want to separate the effect of the new setup from a campaign change, a promotion or a seasonal shift, and a dated log is the only reliable way to do it.

Questions

What is server side tracking?

It is sending tracking events from a server you control to analytics and ad platforms, instead of loading each vendor’s script in the visitor’s browser. The browser still sends your server the original event.

Is server-side better than client-side?

It gives you more control, lighter pages and more durable delivery, but it costs more to run and maintain. Many sites use both. Start with clean client-side tracking and add server-side where it pays back.

Is server side tracking legal?

The method is not illegal, but it does not remove consent requirements. You still need a lawful basis and must respect a visitor’s choices. Check your local rules.

How do I set up server-side tracking for Google Ads?

Create a server container, send events from your web container to it, and add the Google Ads conversion tag there. Use enhanced conversions to improve matching.

Keep going

Have Sprites check your tracking

  • Runs tracking health checks on your pixels and tags
  • Reads GA4, Search Console and every connected ad account
  • Sends a weekly performance review