All Blog Posts

What is Server-Side Tagging?

Close
Read time
8 mins
Published
Dec 5, 2022
Share

  • Server-side tagging runs tracking tags on a server instead of a visitor's browser, giving you more control over what data leaves your site.
  • Server-side tagging typically speeds up page loads and reduces how many scripts ad blockers catch.
  • Server-side tagging doesn't grant GDPR compliance by itself; it requires a consent management platform and the TCF v2.3 signals to work.
  • Google Tag Manager's server container, hosted on Google Cloud or through a managed provider, is the most common way to set up server-side tagging.
  • Server-side tagging setup and hosting costs scale with traffic, which is why businesses without in-house engineering capacity often use a managed provider instead.

Server-side tagging moves tag execution from a visitor's browser to a server you control. Instead of dozens of scripts firing client-side, a single endpoint receives the data and routes it on to your analytics and marketing tools.

That shift matters more now than it did a few years ago. Browser-level tracking protections, ad blockers, and privacy regulations have all made client-side tagging less predictable. Server-side tagging gives you a way to keep collecting accurate data while keeping consent enforcement in one place, rather than scattered across dozens of individual scripts.

Server-Side Tagging, Defined

Server-side tagging is a different way of collecting data than the client-side model most tag managers default to. Tags run on a server rather than in the browser, which cuts your site's reliance on scripts loaded directly from third-party domains.

Because your server handles requests before forwarding them, you get more say over which data leaves your site and in what form. That added control also tends to reduce how many scripts a browser has to load, which can improve page speed.

How Does Google Tag Manager Server-Side Tagging Work?

Google Tag Manager (GTM) offers a way to manage tags, triggers, and variables directly on a server rather than in the visitor's browser. Its server container works alongside your existing web container: tags that would normally fire client-side get moved to run through the server instead.

Marketers and developers tend to reach for GTM's server-side option because it sits inside a tool they already know. Common gains include faster page loads, more consistent data quality, and an easier path toward meeting privacy regulation requirements. Because it runs on infrastructure you configure, it suits companies that want more say over both performance and compliance.

What’s the Difference Between Server-Side Tagging and Server-Side Tracking?

Server-side tagging and server-side tracking describe the same underlying process from two angles.

  • Server-side tagging refers to where the tracking tags run: on the server. 
  • Server-side tracking describes the outcome: tracking that happens server-side rather than client-side.

Both functions use less code to execute in the visitor's browser, which improves the visitor’s browsing experience.

How Can You Use Google Analytics with Server-Side Tagging?

Google Analytics works well with a server-side setup. Instead of sending hits directly from the browser, data passes through your server first, then on to Google Analytics.

This can improve site performance because your server handles the data before forwarding it. It also gives brands a checkpoint to enforce consent and clean up data before it reaches a third party.

What Are the Key Differences Between Client-Side Tagging and Server-Side Tagging?

Client-side and server-side tagging both collect visitor data, but they route it differently. 

  • Client-side tagging relies on scripts running in the visitor's browser to fire tags directly to their destinations. 
  • Server-side tagging sends that data to your server first, which then forwards it to whichever destinations you've configured. 

Here’s a detailed breakdown of their differences:

Client-Side TaggingServer-Side Tagging
Where tags executeIn the visitor's browserOn a server, you or a vendor controls
Ad blocker exposureFrequently blockedLoads through a first-party domain, so it's caught less often
Consent enforcement pointInside the browser-based tag managerOn the server, before data reaches third parties
Page performanceMore scripts loading client-sideFewer scripts, generally faster loads
Data visibilityFull tag payload visible in the browserLimited to what's sent to your server
MaintenanceManaged inside the tag manager interfaceRequires server hosting and ongoing configuration

Who Is Server-Side Tagging For?

Server-side tagging tends to fit companies that want more control over their data and can dedicate some technical resources to maintaining it. For example, businesses handling sensitive personal data can use it to filter, modify, or limit information before it reaches third-party vendors.

Marketing teams also use server-side tagging to get a clearer view across the buying cycle and to support conversion tracking that doesn't depend entirely on browser-based cookies. 

Website visitors also benefit because consent choices carry through more consistently, since data has to pass through a checkpoint before it goes anywhere else.

What Are the Benefits of Server-Side Tagging?

Server-side tagging gives companies greater control over how customer data is collected and shared. It also improves privacy, data quality, website performance, and resilience against changing browser restrictions.

Key benefits include:

More control over your own and your visitors' consented data

One step closer to meeting data privacy compliance requirements

Improved data collection and monetization since first-party server requests are less often blocked than third-party scripts

Faster page loads from deploying a single server-side tag instead of multiple client-side scripts

Stronger data and website security

A more complete view of customers across touchpoints

Easier adaptation to browser tracking protections, such as Safari's Intelligent Tracking Prevention (ITP)

One centralized source of tracking data for compliance audits

Support for both web and app data through the same server endpoint

How to Implement Server-Side Tagging?

While the exact implementation depends on your technology stack, most server-side tagging deployments follow the same core process. The steps below provide a general framework for getting started. 

  1. Pick a tag management system built for server-side tagging: Look for one with clear support and documentation for server-side setups.
  2. Set up server hosting: This can be a self-managed server or a cloud platform such as Google Cloud or AWS.
  3. Route your tags through the server: Configure your tag manager so tags send data to your server endpoint instead of directly to third-party destinations.
  4. Connect consent enforcement: Make sure your server checks consent status before forwarding data to any destination.
  5. Test data flows before launch: Confirm that events arrive correctly and completely at each destination.
  6. Monitor and adjust over time: Vendor requirements and your own stack will both change, so plan for ongoing upkeep rather than a one-time setup.

Please accept marketing cookies to view this video

Accept cookies

How to Set Up Server-Side Tagging with Google Tag Manager

Google Tag Manager (GTM) is one of the most widely used platforms for server-side tagging. Although the setup requires a few additional components beyond a standard web container, the overall process is straightforward once your hosting environment is in place. 

  1. Create a server container in Google Tag Manager, separate from your existing web container.
  2. Set up hosting for the container, typically through Google Cloud's App Engine or another supported host.
  3. Point a subdomain you control (for example, a first-party subdomain) to the server container.
  4. Move relevant tags, such as GA4, Google Ads, or Meta, from your web container into the server container.
  5. Configure clients in the server container so that it can receive and interpret incoming requests correctly.
  6. Connect your consent management platform so that consent signals pass through to the server container.
  7. Test the setup using GTM's preview mode before publishing changes live.

Google's own documentation also explains the full setup process, from provisioning a tagging server to configuring a custom subdomain.

How Much Does Server-Side Tagging Cost to Set Up and Maintain?

Server-side tagging isn't free to run, even when the tag management platform itself doesn't charge for the feature. The main expense is hosting. A server container needs somewhere to run, and cloud hosting options typically bill based on usage, so cost scales with your traffic volume.

Beyond hosting, budget for the engineering time it takes to set up and maintain the server. Initial configuration, ongoing monitoring, and adjustments whenever a vendor updates its tracking requirements all draw on your development team's time.

Businesses without in-house capacity for this often turn to a managed server-side tagging provider instead. Managed solutions fold hosting and maintenance into a subscription fee, trading a higher recurring cost for less internal technical overhead. 

Which option makes more sense depends on your team's capacity and how many tags and destinations you need to support.

How Does Server-Side Tagging Help with GDPR Compliance?

Server-side tagging on its own doesn't grant General Data Protection Regulation (GDPR) compliance. It works alongside your consent management setup, providing a checkpoint to apply consent signals before data reaches third parties.

When you pair Google Tag Manager's server-side option with Google Consent Mode, consent choices collected through your consent management platform get communicated to Google tags, which then adjust their behavior based on what a visitor has agreed to.

Additionally, using the IAB Transparency and Consent Framework (TCF) alongside server-side tagging supports GDPR compliance further by giving vendors a standardized way to check a visitor's consent status before processing their data. TCF v2.3 is the current version of the framework.

How Does Server-Side Tagging Work with Cookies?

Server-side tagging doesn't mean cookies go away. Instead, it changes how tracking data is collected and processed. Depending on your setup, you may still use first-party cookies and, in some cases, third-party cookies. 

Chrome now leaves third-party cookies to a user-choice model rather than blocking or allowing them outright, Safari and Firefox block them by default, and browser privacy protections continue to evolve. Combined with ad blockers and consent requirements, these changes make client-side tracking less reliable over time. Because server-side tagging moves much of the tracking logic to your own server, it’s less affected by these browser restrictions.

Cookies set by your server can also provide more control than those set through client-side JavaScript. They enable you to manage cookie behavior from your own infrastructure while supporting more reliable measurement across browsers.

Plan a Data Strategy That Adapts to Change

Server-side tagging doesn't guarantee privacy compliance or complete access to visitor data. Instead, it's one part of a broader data strategy, best paired with a consent management platform. And it works alongside client-side tracking rather than replacing it outright.

The case for moving to server-side tagging no longer rests on a single cookie deadline. Even with Chrome now leaving third-party cookies to a user-choice model, browser-level blocking, ad blockers, and rising consent decline rates keep eroding how much client-side tools can reliably measure. 

Server-side tagging gives you a way to keep collecting accurate, consented data regardless of how that landscape shifts next, and the setup and maintenance it takes are worth weighing against the alternative: data gaps that get harder to close over time.

Frequently asked questions

Server-side tags are pieces of code that run on a server instead of in a visitor's browser. They handle data collection and processing on the server, giving you more control over how information gets managed before it reaches a destination.

Server-side analytics means collecting and processing visitor data on your server rather than on the visitor's device. The data still originates from the same visitor actions, but a server handles it before it's sent anywhere else.

Standard Google Tag Manager runs tags in the visitor's browser. Server-side tagging is a mode within GTM that moves the execution to a server instead, so the two aren't separate tools so much as two ways of using the same platform.

Yes. Google Tag Manager supports server-side tracking through its server container, which works much the same way conceptually as server-side tagging.

Setting up server-side tagging on your own server generally means creating a tagging server on a cloud platform such as Google Cloud, then configuring your tag manager to route data through it. Google's own documentation walks through the specific setup steps for GTM's server container.