Skip to main content

When you read about tracking, you’ll soon come across two terms: client-side tracking and server-side tracking. Both involve collecting data on what your visitors do on your website, but they do so in two very different ways. And this difference has a significant impact on the reliability of your data, the speed of your website, and how well your adverts perform.

In this article, we explain what client-side tracking is, how it differs from server-side tracking, and the advantages and disadvantages of the two methods. Finally, you’ll get an overview of when it makes sense to choose one, the other, or a combination of both.

What is client-side tracking?

Client-side tracking is the traditional method of tracking. In this case, it is the visitor’s browser – that is, the client – that collects data and sends it directly to your analytics and advertising platforms. This is why it is also known as browser tracking.

When you install Google Analytics, the Meta pixel or the TikTok pixel on your website, this is known as client-side tracking. Each platform has its own script, which the browser loads when the page is opened. The script records events such as page views, clicks and purchases, and sends them from the browser to the platform’s own servers.

This method is easy to get started with, and it has been the standard for many years. However, it relies on the browser actually allowing scripts to run and cookies to be stored. And that is becoming increasingly difficult.

What is server-side tracking?

With server-side tracking, data is instead sent from the browser to a server that you control, typically on a subdomain of your own domain. The server processes the data and forwards it to the platforms via a server-to-server connection.

This means that the browser only needs to communicate with one place – your own server – rather than with a whole host of third parties. You decide what data is passed on, and to whom. You can read more about how server-side tracking serves as a comprehensive solution.

The difference between client-side and server-side tracking

The fundamental difference between client-side and server-side tracking is where the data is sent from. With client-side tracking, data is sent directly from the browser to each platform. With server-side tracking, the data passes through your own server first. This difference has implications in a number of areas.

Client-side tracking Server-side tracking
Where the data is sent from The browser directly for each platform Your own server connected to the platforms
Cookies Set by scripts and often restricted by browsers such as Safari Can be set as first-party from your server and last longer
Ad blockers Often blocks well-known tracking scripts Fewer incidents are blocked because the data is sent to your own domain
Website speed Every script makes the page heavier Fewer scripts in the browser and faster loading times
Control over data The platforms collect data directly in the browser You decide what gets passed on
Set-up Quick and simple Requires a server, a subdomain and technical configuration
Price Usually free Requires hosting and operation
Consent Required for statistics and marketing Required for statistics and marketing

Note the last line. Whichever method you use, you must obtain the visitor’s consent before tracking data for statistical and marketing purposes. Server-side tracking changes the way data is sent. The rules governing when you are permitted to collect this data remain the same.

Browser tracking versus server tracking in practice

The difference becomes most apparent when you look at a specific example.

A purchase involving browser tracking

A customer clicks on a Facebook advert and lands on your online shop in Safari on her iPhone. She has an ad blocker installed. The Meta pixel is blocked, so the purchase is never reported to Meta. Even if the pixel hadn’t been blocked, the cookie from her first visit might have expired if she didn’t make the purchase until a week later.

The result is that Meta is not seeing the purchase. The advert appears to have performed less well than it did, and Meta is shifting its budget away from it.

The same purchase with server tracking

With server tracking, the purchase is sent to your own server on a first-party subdomain. The server forwards the purchase to Meta via the Conversion API, along with the information Meta needs to match it with the correct advert. The purchase is recorded, and Meta learns that the advert is generating sales.

Most people choose to run both methods in parallel, so that both the pixel and the server send the purchase data. The platform automatically removes the duplicate, provided both signals have the same event ID. This provides the most comprehensive coverage. Read more about Setting up the Meta Conversion API, if you advertise on Facebook and Instagram.

Advantages and disadvantages of client-side tracking

Client-side tracking still has its place, but it is important to be aware of its limitations.

Advantages

  • Quick and cheap to set up, often simply by inserting a script or installing an app.
  • Records detailed behaviour within the browser, such as scrolling, clicks and interactions with elements on the page.
  • Requires no server or hosting.

Disadvantages

  • Events are lost when scripts are blocked by ad blockers or browser protection.
  • Cookies have a shorter lifespan, particularly in Safari, so returning customers appear as new ones.
  • Many scripts slow the website down.
  • You have limited control over what data third parties collect.

Advantages and disadvantages of server-side tracking

Server-side tracking solves many of the problems associated with browser tracking, but is more complicated to set up.

Advantages

  • More complete data, because fewer events are blocked and cookies last longer.
  • Stronger conversion signals for Google Ads, Meta and other advertising platforms.
  • A faster website with fewer scripts in the browser.
  • Full control over which data is passed on, and the option to remove personal data.

Disadvantages

  • Requires technical set-up involving a server, subdomain and tags.
  • Hosting and maintenance cost money.
  • Errors in the setup can result in duplicate or missing conversions if it is not tested thoroughly.

When should you choose client-side or server-side tracking?

The choice is rarely a case of one or the other. For most businesses, the best solution is a combination where the browser records the events and sends them to your server, which then forwards them to the platforms.

Client-side tracking alone may be sufficient if

  • your website is primarily informative and does not have any conversions that you are optimising your adverts for.
  • you do not advertise, or advertise only to a very limited extent.
  • you simply need an overview of the traffic.

Server-side tracking makes sense if

  • you have an online shop or generate leads via your website.
  • You’re advertising on Google Ads, Meta, TikTok or other platforms and want to get the most out of your budget.
  • Your figures in Google Analytics, the advertising platforms and your backend system do not match.
  • you will have greater control over personal data and consent.

How does the election affect your figures?

Many people only realise the difference between client-side and server-side tracking when the figures don’t add up. The online shop has recorded 100 orders, Google Analytics shows 80, and Meta shows even fewer. Discrepancies of this sort are often due to browser tracking not capturing all events.

There will always be some discrepancies, because visitors who opt out of cookies cannot be tracked, and because platforms attribute conversions differently. However, a large part of the gap is due to technical limitations in the browser, which server-side tracking can resolve. The closer your figures in the analytics and advertising platforms match those in your backend system, the more you can rely on your decisions regarding budgets and campaigns.

How to switch from client-side to server-side tracking

The switch to server-side tracking does not mean you have to start from scratch. In most cases, you can build on your existing setup.

  1. Review your current tracking. Find out which scripts and events are running today, and which platforms they are sending data to.
  2. Set up a server container. Typically, this involves using server-side Google Tag Manager on a subdomain of your own domain.
  3. Send the events via the server. The browser sends the events to your server, which forwards them to GA4, Google Ads, Meta and other platforms.
  4. Ensure data deduplication and consent. Events must have a unique ID, and consent signals from your cookie banner must be tracked throughout the entire process.
  5. Test and compare. Check that the figures in the platforms match your backend system more closely than before.

The setup requires technical expertise, and errors can lead to incorrect figures. For this reason, many people opt for a solution where the setup and maintenance are handled by specialists.

Frequently Asked Questions

What is client-side tracking?

Client-side tracking is a form of tracking in which the visitor’s browser collects data and sends it directly to analytics and advertising platforms via scripts such as Google Analytics and the Meta pixel.

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

The main difference lies in where the data is sent from. With client-side tracking, data is sent directly from the browser to the platforms. With server-side tracking, the data first passes through your own server, which then forwards it.

Can client-side and server-side tracking be used at the same time?

Yes, and that is the most common solution. The browser and the server send the same events, and the platforms remove duplicates using a shared event ID.

Is server-side tracking more accurate than client-side tracking?

Server-side tracking typically provides more comprehensive data, as fewer events are blocked by ad blockers and browser restrictions. However, the accuracy depends on the setup being configured and tested correctly.

Get started

Are you considering switching from browser tracking to server-side tracking? Calculate your price in under a minute, and see how much a comprehensive solution – including set-up, a cookie banner and Consent Mode V2 – will cost for your website.

Thomas André Jensen is the founder of WeTrack and the founder and CEO of Versano. He established WeTrack based on the simple idea that marketing should be built on reliable data and deliver measurable results. On his blog, he shares insights on server-side tracking, consent and data quality.