Data & Analytics 04.08.25

An introduction to server-side tracking

In website analytics, there are two popular methods of collecting data on the users of your website, client-side tracking and server-side tracking. Regardless of the method used, accurate tracking is the foundation for any successful campaign; it is the key to unlocking better website performance through informed decisions and accurate reporting. Now, when it comes to deciding on which method of tracking you should use, it is important to evaluate the pros and cons associated with both, in order to identify the method that is right for you.

Client-side tracking

Firstly, a brief overview of client-side tracking. This is often seen as the classic approach to website tracking and is generally accomplished through the implementation of website tags. Tags are snippets of code that carry out specific tasks, for example, tracking form submissions or purchases.    

Client-side tracking tends to rely on a tag management system, for example, Google Tag Manager. Before tag management systems, changing the website’s code directly was required to update or edit any tracking tags you had on the site. The only additional code needing implementation on a site when using a tag manager is typically a short script. After that, all of your updates are done on your tag manager. 

With client-side tracking, all of the necessary scripts and tags run directly in the users’ browser, which collects data on how users interact with the site and other events (e.g. page views or adds to cart) and sends them to 3rd party platforms – for example, Google Analytics. 

So to summarise, client-side tracking is where all tracking is executed directly in the users’ browser, it generally uses a tag management system to manage tags and scripts.

 

Traditional website configuration without server-side Tag Manager

 

 

There are several advantages of this approach, such as its simplicity to implement and manage. Using a tag management system also offers an easy-to-navigate interface, and there is also generally no cost to client-side tracking. 

However, this does come with some significant drawbacks. Since the tracking is all happening within the browser of the users, the scripts are exposed to browser extensions such as ad blockers that can prevent the tracking scripts from loading. In addition, several browsers limit the use of cookie storage, for example, Safari clears 1st party cookies after 7 days and 3rd party cookies after just 24 hours, which can significantly impact tracking across sessions. Additionally, if you have lots of events you wish to track, this could begin to affect the load speed of the website. Client-side tracking can also lack some of the control necessary for accuracy.

Enter the alternative, server-side tracking, which allows for greater control and more accurate data.

 

Server-side tracking

Server-side tracking is where one central cloud-based repository collects all audience data, and once you have captured this data into your server, you can forward it to third-party platforms. With server-side tracking, the process of tracking data no longer exists within the user’s browser (client) but on a server. The collection, processing, and forwarding of data is managed via this server. The tracking scripts are loaded from your domain and send the data to your server first. This creates a buffer layer. From your server, you can decide which data to share with which tool/platform. The main advantage of this method is that the data stream cannot be blocked. 

The process starts similarly to client-side tracking – when the user visits a website, a tag manager script loads. However, with server-side tracking, the data is not processed in the browser and sent to third parties; It is instead first sent to your server, where the server tag manager is running. The server then processes the tracking data and forwards it to the relevant third-party tools. This limits communication between the user of your site and a third party. 

 

The benefits of server-side tracking

The biggest advantage of using server-side tracking, in many cases, is the ability to collect more data with additional controls. For example, when you install GA4 using client-side tracking on a site, it may not only track what you instruct it to, but it can also collect additional information about the user’s device. These tracking codes related to advertising will collect as much information as possible to help identify visitors with higher accuracy. However, this could leave your site open to data leaks as you are not fully in control of what is being sent. Having a custom-built JavaScript library that collects the data you specify and sends it to your server is the best way to have more control over your data.

Instead of having dozens of JavaScript snippets sending data to various platforms that can slow down your site, you could just have a few scripts sending data to your server-side container, in which you can modify the data according to the needs of the tools and platforms you use before sending it on.

Server-side tracking can improve accuracy and reduce the impact of ad blockers, for example, if a user who visits your website consents to website cookies but is also using an ad blocker that blocks all requests to google-analytics.com/collect, the request would be blocked, and no data would be sent to your GA4 property. With server-side tracking, you can create a subdomain to send your data to, for example, analytics.yourdomain.com. Currently, ad blockers do not block requests sent to domains like this.   

However, there are some drawbacks, including additional complexities in setting it up, which requires highly specialised knowledge. There are also additional costs to run each server, however, the benefits of more accurate data tend to outweigh the costs.

Key takeways

As digital privacy concerns grow and browser limitations increase, the shift from client-side to server-side tracking is becoming more important for businesses seeking reliable and accurate data. While client-side tracking remains accessible and easy to implement, server-side tracking offers greater control, improved data quality, and resilience against common blockers and browser restrictions. Although it involves additional costs, the long-term value of cleaner, more comprehensive data often justifies the investment. Ultimately, the right tracking solution will depend on your specific goals, resources, and the level of data accuracy your campaigns demand.

Haris
04.08.25 Article by: Haris, Data, Analytics & Tracking Manager More articles by Haris

Need help turning your data chaos into clarity?

Get in touch
cta-background cta-background

Any questions about our blogs?