Client-side vs server-side tracking 

Client-side or server-side tracking: where your measurement data is processed

Three people sit smiling around a laptop at a table in an office.
Ralph Grundmann · Last updated on 4 November 2026

With client-side tracking, your visitors’ browser sends measurement data directly to each individual provider, such as Google Analytics, Google Ads or Meta. With server-side tracking, the data first goes to a server that you operate yourself and only then to the providers. This determines who receives which data, how much load tracking puts on the website and how long cookies last. A server does not replace consent; whether consent is needed depends on the processing involved.

Client-side tracking: measurement in the browser

With client-side tracking, all measurement scripts run in the browser. A typical setup: Google Tag Manager loads the tags for Google Analytics, Google Ads, Meta and perhaps an affiliate network on every page. Each script collects data about the visit and sends it to its own provider.

To recognise returning visitors, the scripts store cookies or use the browser’s web storage. Google Analytics 4 sets a first-party cookie on your domain for this. Client-side tracking is quick to set up, needs no infrastructure of your own, and almost every tool supplies ready-made code for the browser.

Server-side tracking: your own server in between

Server-side tracking with Google Tag Manager uses two containers. The web container in the browser sends the events as a single data stream to a server container. The server container runs in a cloud environment, usually on Cloud Run in your own Google Cloud project. In the server container, components known as clients receive the requests and turn them into events. Tags in the server container then pass these events on to the individual services, for example to Google Analytics or to Meta via the Conversions API.

According to Google, only you have access to the data in the server until you pass it on to a service. Google strongly recommends running the server on your own domain, ideally on the same origin as a path of your website (such as your-domain.com/metrics) or, alternatively, on a subdomain.

The differences at a glance

  • Data flow: client-side, the browser talks to each provider separately. Server-side, it only talks to your server, and the providers receive their data from there.
  • Control: on the server you can check requests, standardise values, remove details such as the IP address or discard requests entirely before anything is passed on. You can also enrich data, for example with the margin of an order, without that value being visible in the browser.
  • Loading time: the fewer scripts run in the browser, the less work the visitor’s device has to do. How much this helps depends on how many tags previously ran in the browser.
  • Cookies: according to WebKit, Safari deletes cookies set by JavaScript if the visitor does not interact with the website for seven days. A server container on your own domain can set cookies in the server response, with the HttpOnly attribute if required. Google describes HttpOnly cookies as more durable and more secure. Whether Safari keeps these cookies for longer than seven days depends on whether Safari attributes the server to a third party via its CNAME record or IP address. You should measure this after setup.
  • Effort: client-side, a code snippet is enough. Server-side, you also need a server, a setup on your own domain and ongoing maintenance and monitoring.

Limits and costs of server-side tracking

Server-side tracking does not replace the browser. The server only learns what a visitor does on the page because the web container reports it. Tools that need to record behaviour on the page itself continue to run in the browser.

There are also running costs. In its guide for Cloud Run, Google estimates around 45 US dollars per server per month and recommends at least two servers in production. With more requests, Cloud Run starts further servers automatically. What other environments cost and which one suits you is described on our server-side tracking page.

With server-side tracking too, every measurement starts with a request from the browser, and as a rule cookies are set on or read from the device. For storing and accessing information on the device, Section 25 of the German TDDDG generally requires consent. Exceptions are narrowly limited, above all to what is strictly necessary for a service the user has explicitly requested; this is usually not the case for analytics and advertising. If the server passes personal data such as the IP address or order data on to services, a legal basis under the GDPR is also required. Whether and for what you need consent depends on the processing involved. You should clarify the details with your data protection officer.

Technically, the choice made in the banner has to reach the server, because a refusal in the cookie banner must also be respected in the server container. According to Google, you only need to set up consent mode in the web container. The Google tag passes consent on with every request, and the Google tags in the server container act on it. For other providers’ tags in the server container, such as the Meta Conversions API, the setup must check consent explicitly.

When server-side tracking pays off

Server-side tracking pays off above all when several advertising and analytics services need the same data, when you want precise control over which details go to whom, or when conversions should reach the advertising platforms with the correct values. For a small website with Google Analytics as its only service, the effort is rarely worthwhile.

In consent management, we give every tag in Google Tag Manager the appropriate consent condition. With server-side tracking and a clear banner design, measurement gaps can be reduced without bypassing the user’s decision. If affiliate networks and other paid channels run in parallel, a tracking switch is added. It determines which channel a sale is reported to when several were involved, so that the same order is not paid for twice.



 Your next step 

Are you thinking about moving your tracking to the server, or would you like your existing setup checked?

Our page Server-Side Tracking explains how we work. In an initial consultation, we clarify what makes sense for your website.


Request a consultation
 Frequently asked questions 

Client-side vs server-side tracking: key questions

What is the difference between client-side and server-side tracking?

With client-side tracking, the browser sends measurement data directly to each provider. With server-side tracking, it sends the data to a server that you operate yourself. There you decide what is passed on to whom.

Does server-side tracking require consent?

In principle yes; in detail it depends on the processing involved. Server-side tracking usually also sets or reads cookies on the device, for which Section 25 of the German TDDDG generally requires consent. Passing on personal data also requires a legal basis under the GDPR. A server does not replace consent; clarify the details with your data protection officer.

How much does server-side tracking cost?

For Cloud Run, Google quotes around 45 US dollars per server per month and recommends at least two servers in production. With a lot of traffic, more are needed. Setup and ongoing maintenance come on top.

Does server-side tracking replace Tag Manager in the browser?

No. The web container stays on the website and reports the events to the server container.

 Request a consultation 

Questions about this topic?

Tell us briefly what it is about. You will speak directly to Ahmed Badia.
Microsoft Partner Badge
SISTRIX-zertifizierte Agentur
4.9
Based on 32 reviews

Reviews from our Google Business Profile. We check every review against our client projects.

Request a consultation
Ahmed Badia
Ahmed BadiaSenior Software Developer Team LeadCall: +49 228 243 313 54

* Required

Please enter your name.

Please enter a valid email address, e.g. name@company.com.

For a call back.

Please enter your number with area code, e.g. +49 228 243 313 53.

Please tell us briefly what it is about.

Free and without obligation. We usually reply on the same working day.

Information on how we process your data: Privacy policy