Free Google Ads & Meta ads audit for new clients. Book yours →
Web Zodiac homeGet a free audit
Menu
Tracking

Server-side tracking explained plainly

How server-side tracking and server-side tagging work, what they can and cannot fix, what hosting costs, how consent applies, how to set it up and a calculator to judge whether it pays for itself.

In short: Server-side tracking sends website or app events through a server you control before they reach analytics and ad platforms. With Google Tag Manager, a server container receives events, then forwards chosen data to destinations such as GA4. It gives more control over data and can support first-party, same-origin collection. It does not remove consent requirements, beat every blocker or guarantee more accurate numbers.

Server-side tracking is often sold as a cure for lost conversions. It is a useful piece of infrastructure, and it solves some problems well. This guide separates what it changes from what it does not, so you can decide whether to build it and do it properly if you do.

What is server-side tracking?

In ordinary client-side tracking, scripts in the visitor's browser send data straight to each analytics and ad company. In server-side tracking, events go to a server you control first. That server decides what to keep, change or remove, and what to forward.

The term covers two things:

  • Server-side tagging. A tag manager running on a server. In Google's version, a server container uses tags, triggers and variables like a web container, but runs in your Google Cloud project or another environment you choose.
  • Server-to-server integrations. Your backend, store or CRM sends events straight to a platform's API, such as Meta's Conversions API.

Client-side vs server-side tracking

Comparison of client-side tracking, where the browser sends data to several vendors, and server-side tagging, where the browser sends to your server which forwards chosen data Client-side Browser AnalyticsAd platform 1Ad platform 2 Server-side tagging Browser Your server containerclient reads the requestyou filter and map data Your backend or CRM AnalyticsAd platform 1Ad platform 2
Simplified. In practice many sites run both, with some browser tags still in place.
QuestionClient-sideServer-side
Who sends to vendors?The visitor's browserYour server
Control over data sharedLimited once vendor scripts runYou can filter and reshape before forwarding
Offline and backend eventsHardNatural fit
Cost and skillsLowHosting, setup, monitoring and updates
Failure riskBrowser blocking and script errorsAll of those on the way in, plus your server and mappings
ConsentRequired where law requires itStill required

How server-side tagging works in Google Tag Manager

  1. The website sends a request to your server URL. With the Google tag, this is set with the server_container_url setting.
  2. A client in the server container claims the request. Google describes clients as adapters that turn incoming data into events. A Google Analytics 4 client is pre-installed.
  3. Triggers check each event and fire tags.
  4. Tags send data on to GA4, ad platforms or other endpoints, with whatever changes you configured.

Server-side tags run in a sandbox with permissions that show what each tag can do. Review community templates before adding them, in the same way you would review any code that handles customer data. See Google's guide to sending data to a server container.

Benefits of server-side tracking and their limits

Claimed benefitWhat is reasonable to expectLimit
Better data controlYou can remove or hash fields and decide what each vendor receivesOnly if you configure it; a pass-through setup changes little
Faster pagesPossible if you remove browser scripts that the server now replacesAdding a server while keeping every script gains nothing
More durable cookiesSame-origin servers can set first-party cookies in server responsesBrowser rules still apply and can change
More complete conversionsBackend events such as paid orders can be sent even if a browser tag failsMatching to ads still needs identifiers and consent; no fixed uplift is guaranteed
Security of secretsAPI tokens can stay on the server rather than in page codeThe server must be secured and updated

What Safari does with cookies

WebKit's tracking prevention policy says Safari's Intelligent Tracking Prevention deletes cookies created in JavaScript, and other script-writable storage, after 7 days without user interaction with the site. It also caps cookies set in HTTP responses to 7 days when it detects third-party CNAME cloaking or third-party IP address cloaking. In plain terms, pointing a subdomain at an unrelated host does not automatically give your cookies a long life. How your server is hosted and routed matters.

Subdomain, same origin or default domain

Google's custom domain guide compares three options:

OptionExampleGoogle's description
Same origin (best practice)www.example.com/metricsFull access to server-set cookie benefits; you configure a CDN or load balancer to forward requests
Subdomainmetrics.example.comGoogle lists full server-set cookie benefits; needs DNS changes
Default domainThe host's default address, such as a run.app URLNo server-set cookie benefits; only JavaScript cookies

Read Google's table alongside the WebKit rules above. A subdomain that resolves to infrastructure treated as third-party may still be capped in Safari, so test the actual cookie lifetime after launch.

Moving a tag to a server does not remove your legal duties. If consent is required to store or read information on a device, or to share personal data for advertising, that still applies. Sending data from your server can also be less visible to visitors, which makes honest notices more important, not less.

  • Use a consent banner or consent management platform, and pass the choice to the server.
  • Google's consent mode guide for server-side tagging says a web container collects consent and the server container acts on the signals. Consent mode itself does not provide the banner.
  • Check every non-Google tag separately. Do not assume it reads Google's consent signals.
  • Send only what each destination needs. Remove personal data from URLs.
  • Set log retention and access rules. Server request logs can contain personal data.
  • Review contracts, data transfer rules and sector laws, such as health privacy rules, with qualified counsel.

Hashing an email address is not the same as making it anonymous. Platforms use hashed data to match people.

What does server-side tracking cost?

Google's Cloud Run setup guide estimates that each server in its configuration, with 1 vCPU and 0.5 GB of memory with CPU always allocated, costs about $45 a month. It recommends at least 2 instances to reduce the risk of data loss during an outage, though you may run fewer. Google expects autoscaling of 2 to 10 servers to handle about 35 to 350 requests per second, depending on your tags. It also warns that default request logging can create significant charges for servers handling many requests, such as more than 1 million a month, and suggests disabling or reducing it.

Cost itemWhat to budget for
HostingCloud Run, another cloud or a managed server-side GTM host
Logging and networkDepends on traffic and settings
SetupDeveloper or specialist time for domain, mapping, consent and testing
MaintenanceServer image updates, API changes, monitoring and retesting

Google recommends keeping the tagging server updated because new versions include security fixes.

Server-side tracking value calculator

This is a planning tool, not a prediction. The extra conversions figure is the weakest input: you can only know it by measuring. Try zero and see whether the project still makes sense for control and data quality alone.

Would it pay for itself?

Defaults other than Google's $45 server estimate are made-up examples. Better reporting alone does not create profit; count a gain only where measurement changes decisions or bidding and you can test it.

Is server-side tracking worth it for you?

Signs it may be worth itSigns to wait
Significant ad spend where conversion data drives biddingBasic events are still broken or double counted
Important outcomes happen in your backend or CRMLow traffic and few conversions
You need tight control over what vendors receiveNo consent setup yet
Someone owns monitoring and updatesNo one will maintain the server

First get ordinary measurement right with our GA4 conversion tracking guide. Many problems blamed on browsers turn out to be wrong triggers or missing tracking on one form.

Google tag gateway for advertisers as a lighter option

Google tag gateway for advertisers serves the Google tag from your own domain through your CDN, load balancer or web server, and sends some measurement requests to Google through that domain. Google says it recommends it for the most durable tag configuration. It is not the same as a server container: it concerns Google tags and does not give you a place to transform data for many vendors.

How to set up server-side tracking

  1. Write a data map. List each event, its source, destinations, fields, consent requirement and owner.
  2. Fix and test the current web tracking. Record a baseline from your CRM or store.
  3. Create a server container in Google Tag Manager.
  4. Deploy the tagging server. Google offers a Cloud Run guide, an App Engine guide and manual setup; third-party hosts are another route.
  5. Map your domain as same origin or a subdomain.
  6. Point the web tag to the server with the server container URL, and update your content security policy if you use one.
  7. Configure clients and tags for each destination, starting with one, usually GA4.
  8. Pass consent and check that each tag behaves correctly when consent is denied.
  9. Preview and debug both containers, then compare with your baseline for a few weeks.
  10. Monitor. Alert on errors and sudden drops, set a billing alert and schedule updates.

Debugging in preview mode

Server-side preview shows incoming requests, which client claimed each one, which tags fired and what they sent. If a request never appears, check the server URL and domain mapping. If it appears but no client claims it, check the client settings and request path. If a tag fires but data is missing in the destination, inspect the outgoing request and the destination's own test tool.

Server-side tracking for Google Analytics 4, Google Ads and Meta

GA4

The web tag sends events to your server, the GA4 client receives them and a GA4 tag in the server container forwards them. Check that sessions, sources and key events match your baseline after the change.

Google Ads

Server containers can run Google Ads conversion tags. Keep click identifiers intact, avoid counting the same sale twice through two methods and follow current Google Ads setup guidance. For sales that close later, offline conversion imports from your CRM are a separate job from server-side tagging.

Do enhanced conversions for leads need server-side tracking?

No. Google describes enhanced conversions for leads as an upgraded form of offline conversion import that uses hashed user-provided data, such as an email address from a lead form. It can be set up with the Google tag or Google Tag Manager, and no server container is required. Google says that if you do use server-side Tag Manager or Google tag gateway, user data is encrypted before Google receives it, currently for Google Ads tags only. Two recent changes matter. Since April 2026, enhanced conversions for web and for leads have been a single setting. Google's help page also says that from June 15, 2026, these uploads and offline conversion imports move to the Data Manager API and are blocked in the Google Ads API, apart from legacy access for developer tokens that qualify.

Meta Pixel and Conversions API

When Meta receives the same event from the browser pixel and the Conversions API, it needs a way to remove the duplicate. Meta's deduplication guide recommends matching an event ID: the pixel's eventID must equal the API's event_id, and the event names must match. Matching events sent to the same pixel within 48 hours are deduplicated. See our Conversions API guide.

Bing server-side tracking with Microsoft Advertising

Microsoft Advertising has a Conversions API, which it describes as its server-side solution for sending conversion and customer interaction data from your systems. Microsoft says it can carry website events, CRM events, offline sales and mobile events. It works alongside Universal Event Tracking (UET). Check Microsoft's guide for access requirements in your account, identifiers, consent signals and how to avoid counting an event twice.

Klaviyo and other tools

Other platforms offer their own APIs or server tag templates. Check each vendor's current documentation for required identifiers, consent handling and deduplication rather than copying a GA4 setup.

Server-side tracking for Shopify, WooCommerce and WordPress

PlatformCommon routesCheck
ShopifyOfficial channel apps with server connections, or an app or custom pixel feeding a server containerCheckout events, order IDs and whether two apps send the same purchase
WooCommerce and WordPressA plugin that pushes events to the data layer or sends server eventsPlugin updates, caching, consent plugin compatibility and duplicates
Custom sitesBackend sends events when orders or leads are savedRetries that could resend the same event; use stable IDs

Server-side tracking tools

Tools fall into groups. Choose by what you need, and check current features and prices directly:

  • Server-side Google Tag Manager on your own cloud, for flexibility.
  • Managed hosting for server-side GTM, for less infrastructure work.
  • Platform connections such as store apps that include a server integration.
  • Customer data platforms that route events from servers and apps.
  • Analytics suites with their own server collection options, including some privacy-focused tools.

Ask where data is processed and stored, how consent is handled, how duplicates are prevented, how you export or delete data and what happens if you leave.

Testing after launch

  • Compare orders or leads in your system with each platform by ID where possible.
  • Confirm events fire once, with the right values and currency.
  • Test consent granted and denied, and inspect outgoing requests.
  • Check cookie lifetimes in Safari and other browsers you care about.
  • Simulate a server error and confirm you get an alert.
  • Keep a rollback plan: the previous container version and web-only setup.

Server-side tracking improves plumbing, not strategy. If you want help deciding or auditing a setup, our performance marketing team can help, and our attribution guide explains how the data is then credited to channels.

Rahil Joshi, founder of Web Zodiac

More than ten years in digital marketing, starting in SEO and now running Google Ads, Meta ads and ChatGPT ads for clients in the US, UK, Australia and India. About Rahil · Upwork profile

Sources

  1. Google Ads Help: About enhanced conversions for leads. support.google.com
  2. Google for Developers: An introduction to server-side tagging. developers.google.com
  3. Google for Developers: Set up server-side tagging with Cloud Run. developers.google.com
  4. Google for Developers: Custom domain configuration. developers.google.com
  5. Google for Developers: Send data to server-side Tag Manager. developers.google.com
  6. Google for Developers: Consent mode with server-side Tag Manager. developers.google.com
  7. Google for Developers: Set up Google tag gateway for advertisers. developers.google.com
  8. WebKit: Tracking prevention in WebKit. webkit.org
  9. Microsoft Learn: Conversions API integration. learn.microsoft.com
  10. Meta for Developers: Handling duplicate Pixel and Conversions API events. developers.facebook.com
Questions

Frequently asked questions

What is server-side tracking?

It is measurement where events go to a server you control, which then processes and forwards them to analytics and advertising platforms, instead of the browser sending everything directly to each vendor.

How does server-side tracking work?

The website or your backend sends an event to your server. In Google's server-side Tag Manager, a client receives it, turns it into event data, and tags send it to the destinations you configure.

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

People often use them interchangeably. Google's product term is server-side tagging, meaning tags run in a server container. Server-side tracking is the broader idea of collecting or sending measurement from a server, which also includes direct API integrations.

Does server-side tracking use cookies?

It can. A server on your own domain can set and read first-party cookies. Browsers still apply their own rules, and consent rules still apply.

Is server-side tracking GDPR compliant?

Not automatically. It can help you control and minimise what you share, but you still need a lawful basis, consent where required, clear notices and suitable contracts. Get legal advice for your situation.

Does server-side tracking bypass ad blockers?

Do not plan on that. Some blockers can still block your endpoint or the scripts that send events, and bypassing a visitor's choice raises trust and legal concerns.

How much does server-side tracking cost?

Hosting plus setup and maintenance. Google's Cloud Run guide estimates about 45 US dollars a month per server and recommends at least two servers for resilience, before logging and network charges. Third-party hosts set their own prices.

Why do you need server-side tracking?

Not every business does. The usual reasons are control over what each vendor receives, sending outcomes that happen in a backend or CRM, keeping API tokens out of page code and setting first-party cookies from your own server.

Is server-side tracking worth it?

It is most likely to pay off with significant ad spend, important conversions that happen on your server or in your CRM, and a team that can maintain it. Fix basic tracking and consent first.

Do I still need the browser pixel?

Usually yes. The browser provides context that the server may not have. When both send the same event to a platform, use that platform's deduplication method.

Free audit

Find out what your ad spend is really returning

A free review of your Google Ads, Meta ads and tracking. No obligation.

Get my free audit →
WhatsApp