Search

Server-Side Tracking: How It Works and What You Get Out of It

In practice, server-side tracking functions as an extension of your existing client-side tracking. It adds an extra layer where your own server also forwards data to your analytics and advertising platforms, in parallel with what’s already happening in the browser. When we talk about "your own server," we’re rarely referring to a physical server that you have to run from scratch. It’s typically set up via a cloud solution like Stape or Google Cloud Platform. The advantage is more complete and reliable data, because this setup isn’t affected by ad blockers and short cookie lifetimes in the same way as purely client-side tracking. Below, we’ll go over the difference between client-side and server-side tracking, what you gain from it, and how it interacts with consent.
Cecilia Studer
Cecilia Studer
CRO and Tracking Specialist

Server-side tracking is often presented as the solution to a single problem: You’re losing data, and a server-side setup retrieves it. That’s true to a certain extent, but how much you recover depends on your setup and your visitors, and it’s rarely the whole story. There’s also another benefit that’s just as important in practice. With your own server, you can enrich and transform data along the way, so that what’s sent to the platforms is more accurate and more useful than the raw events from the browser. We’ve been working with server-side setups for clients since 2020, and below we’ll share what you really need to know before you get started.

Client-side vs. server-side tracking: Where data is collected

The difference between client-side and server-side comes down to one question: Where in the process data is collected and forwarded.

Client-side tracking

Everything happens in the user's browser

  • JavaScript from your tracking scripts runs directly on the visitor's device, reads and sets cookies.
  • Data is sent from there directly to Google Analytics, Google Ads, Meta, and the other platforms.
  • Simple setup, but vulnerable: everything depends on what the browser and its extensions allow.
Server-side tracking

An additional link in your own ecosystem

  • The browser sends a request to your own server, typically a server-side container in Google Tag Manager.
  • The server receives the data, processes it, and forwards it to the appropriate platforms.
  • Part of the shipment takes place in an environment that you control, rather than exclusively in one over which you have no control.

With classic client-side tracking, the browser is both where the data is generated and where it is sent from. With server-side tracking, also known as server-side tagging, you add an extra step. Google’s documentation on server-side tagging in Google Tag Manager describes exactly the model in which a server container receives and forwards data.

A concrete example makes the difference clear. Imagine that your website sells real estate. In this case, the decision-making process is typically long—often several months—during which the visitor returns again and again. With client-side tracking, you risk having the same person counted as a new user each time, because the cookie has long since expired between visits. With server-based tracking, you’re better able to recognize the user over time, precisely because you control how data is stored and transmitted. As a result, you get a more accurate picture of who is actually navigating your website.

The Benefits of Server-Side Tracking

The main benefit of adding a server-side layer is, first and foremost, data quality. Four aspects can improve noticeably, and they all stem from the same fundamental change: Part of the transmission process is moved to a location that you control.

01 · RESILIENCE

Fewer losses due to ad blockers

When scripts run in the browser, they can be blocked before they even send anything. When the data is sent from your server, there’s less for the extensions to interfere with, and more events get through.

02 · SERVICE LIFE

Data That Lasts Longer

Safari’s Intelligent Tracking Prevention and Firefox’s equivalent protection actively shorten the lifespan of cookies set via browser scripts, in some cases to just a few days. Cookies set from your own server can last longer, and you’ll avoid some of the artificially inflated numbers for new users.

03 · PERFORMANCE

A simpler website

Some of the heavy tracking logic can be moved from the user’s browser to the server, so fewer scripts run on the visitor’s device. This can improve load times and the user experience, which is especially important on mobile devices.

04 · CONTROL

Better Management of Your Data

You can enrich and transform events on the server and determine which fields are sent to which platforms, rather than leaving that decision to third-party scripts.

If you prefer a privacy-friendly analytics option, server-side tracking works well with a tool like Piwik PRO or Matomo, where you own the data yourselves.

GDPR and Consent Mode v2: Server-side implementation that relies on consent, not bypassing it

A common misconception is that server-side tracking is a way to bypass consent. It is not, nor should it be. The discussion about server-side tracking and the GDPR is not about collecting data covertly, but about processing legally collected data in an environment that you control.

Consent is still given by the user in your cookie banner—that is, your consent management platform (CMP)—just as before. What’s important to understand is how that consent is enforced from there. Google’s Consent Mode v2 passes the user’s choice on to Google’s own tags—namely, GA4 and Google Ads—so they can adjust what they’re allowed to track. All other tools, such as Meta Pixel, do not respond to Consent Mode. Your CMP must block these directly until the user has given consent. This principle does not change on the server side: Consent must be in place before data is processed, regardless of whether a tag is fired in the browser or on your server.

If you need to set up the consent layer itself, you can read more about our work with tracking and data, which includes setting up CMP and Consent Mode.

Server-side processing builds on consent; it never replaces it

A proper server-side setup processes only the data that the user has authorized. Consent is obtained through your CMP, and for Google tags, the status is tracked via Consent Mode v2. The CMP must withhold all other data until a choice has been made.

What the server-side requires of you

Server-side tracking is more involved to set up than a traditional client-side setup, and it must be done correctly to provide clean data. On the other hand, it isn’t necessarily an ongoing burden for you. Some setups run smoothly after proper implementation, while others should be reviewed periodically as platforms and consent requirements change. We handle both scenarios—with or without a fixed agreement for ongoing maintenance.

Hosting a server-side setup comes at a cost, and that cost typically depends on your traffic volume. This should be factored into your decision from the start. We’ve been implementing server-side solutions for clients since 2020 and can help you assess what makes sense for you before you get started.

Frequently Asked Questions About Server-Side Tracking

Does server-side tracking cost extra?

Yes. Unlike a purely client-side setup, the server-side container must be hosted somewhere, and that entails an ongoing cost that typically depends on your traffic volume. Exactly how much this will cost you depends on your traffic and setup, and we’d be happy to discuss that in a no-obligation consultation rather than providing a specific figure here.

How do you set up server-side tracking in Google Tag Manager?

In short, you create a server-side container in Google Tag Manager and link it to a server endpoint to which the browser can send data. But before any tags go live, the consent layer must be in place: Your CMP must be connected, and Consent Mode v2 must be configured according to the CMP you’re using, so that Google’s tags only track what the user has accepted. Only then can you configure the tags that will receive and forward data. This is a multi-step technical process.

Is server-side tracking legal under the GDPR?

Yes, when it is based on valid consent. The user gives consent via your cookie banner, and for Google tags, the consent status is tracked via Consent Mode v2. Server-side processing is not a method for circumventing consent; it is a way to handle legally collected data in an environment that you control.

Would you like to know if server-side is right for you?

Server-side tracking provides you with more comprehensive and reliable data, but the benefits depend on it being set up correctly. You don’t need to make a big decision or tear down your current setup to figure out where you stand. The first step is to assess what you already have and where data is leaking.

Sources and Further Reading

The technical descriptions on this page are based on Google's and WebKit's own documentation. The specific tracking and consent setup should always be evaluated in light of your platforms, purposes, and internal guidelines.

Get a no-obligation review of your tracking setup

We’ll take a look at your current setup, point out where data is being lost, and give you our honest opinion on whether a server-side solution makes sense for you. No obligations, and no changes to your website until you decide to make them.

GET A TRACKING AUDIT

Cecilia Studer
Cecilia Studer
CRO and Tracking Specialist
GET MORE KNOWLEDGE

Related guides

We have received your request

Thank you for your inquiry . We appreciate the opportunity to discuss your project. You'll hear from us within 1-2 business days

Step 1 / 3

    Step 1 / 3 - Get an estimate

    Select project type

    SEOGoogle AdsSocial mediaMarketing automationAI implementationData & InsightsOthers