Data & Tracking
Server side tagging: how to set it up with Google Tag Manager
Copy for AI
Server-side tagging moves your tags from the visitor’s browser to a server you control.
The browser sends one data stream to that server, a Google Tag Manager server container. It processes the data and forwards it to GA4, Google Ads, Meta or other platforms.
The verdict: server side tagging is about control, not about getting around consent. You get fewer scripts, more say over what you share and more durable first-party cookies.
Below: how it works, when it’s worth the effort and how to set it up in seven steps.
What is server-side tagging?
It’s tagging where your tags run in a server container instead of in the browser.
How classic tagging works
With classic, client-side tagging, every tool loads its own script in the browser. Think of the Google tag, the Meta pixel and the LinkedIn Insight Tag.
Each script sends data to its own server. You can’t see much of what leaves your site.
What changes with a server container
With server-side tagging, the browser sends measurement requests to your tagging server instead.
Google describes it in its documentation on server-side tagging as a container that runs “on a server that you control”. That’s your own Google Cloud project or another environment.
Inside that container, so-called clients turn the incoming requests into events. Tags then forward those events to the platforms you choose.
Until you forward something, it’s yours alone. Here’s the flow:
Client-side and server-side side by side
| Client-side tagging | Server-side tagging | |
|---|---|---|
| Where do the tags run? | In the visitor’s browser | In a server container you control |
| Scripts on your site | One per tool | Mainly the Google tag or web container |
| Cookies | Often set by JavaScript, shorter lifespan | Set by your server on your own (sub)domain |
| Control over shared data | Low: each script sends on its own | High: you filter and enrich before forwarding |
| Cost and maintenance | No hosting | Hosting, monitoring and management |
Server-side tagging or server-side tracking?
Same setup, two names.
In practice, marketers use both terms interchangeably.
Strictly speaking, server-side tagging is the technique (tags in a server container). Server-side tracking is the result (measuring via a server instead of directly from the browser).
Anyone searching for “server side tracking” is usually looking for the same setup.
Why do companies choose server-side tagging?
Four reasons. Control, durable cookies, fewer scripts and richer data.
1. Control over what you share
By default, every tag in the browser sends everything it can pick up. That means URLs, referrers and sometimes even form fields in a query string.
In a server container you see every request come in. You decide. Per platform, per field.
You manage all of this in one place:
- truncating an IP address
- stripping an email address from a URL
- sending a field to Google Ads but not to Meta
2. More durable first-party cookies
Say your tagging server runs on a subdomain of your own site, such as metrics.yourdomain.com. Then that server sets cookies in a first-party context.
In its guide to a custom domain, Google calls this a best practice. It gives you “the security and durability benefits of server-set cookies”.
On your cloud provider’s default domain, the server runs in a third-party context. It can only set JavaScript cookies.
Read why this matters in our pieces on first-party data and third-party cookies.
3. Fewer scripts in the browser
Every extra pixel costs load time. It adds up.
By serving tools such as Meta and LinkedIn via the server, part of that JavaScript disappears from the browser.
You can see what your scripts cost in your page speed data. Ours shows an LCP of 1.9 s and a CLS of 0.13 on mobile:
PageSpeed Insights field data for customerimpact.be on mobile, October 2026. Every script you drop from the browser helps keep these numbers green.
Don’t expect miracles: the Google tag or web container is still needed to collect the data.
Test your own pages with the free website speed test.
4. A place to enrich data
A server container can add data the browser doesn’t know, such as a margin per product or a lead status.
That way you send Google Ads a conversion value that’s closer to revenue.
Server-side tagging and consent (GDPR)
Consent stays mandatory. Browser or server, it doesn’t matter.
What the regulators say
The Belgian Data Protection Authority (GBA/APD) is clear. Consent first. A cookie for analytics purposes isn’t strictly necessary, so it requires consent.
Withdrawing that consent must be as easy as giving it. In the Netherlands, the Autoriteit Persoonsgegevens takes the same line.
That doesn’t change because the data runs through your server. Our guide to Google Analytics and GDPR covers the wider picture.
How consent reaches the server
What does change? You can pass the consent status to the server container and respect it there per tag.
Google works with four consent types:
ad_storageanalytics_storagead_user_dataad_personalization
Basic or advanced consent mode
In the basic variant, Google tags only load after a choice in the banner.
In the advanced variant they load immediately with a default status of “denied” and send cookieless pings.
How to set that up for Google Ads is explained in consent mode v2 for Google Ads.
Quick check: see which cookies your site sets before consent with the free cookie scanner.
Setting up server-side tagging in 7 steps
From inventory to a tested production setup, in this order:
1. Take an inventory of your tags and consent
List which tags run today, which events they measure and which consent category they fall under.
This is also the moment to clean up. Duplicate GA4 tags and forgotten pixels don’t move with you. They stay behind.
Why first: without this step, you copy existing errors into a more expensive environment.
2. Create a server container in Google Tag Manager
In Google Tag Manager, choose a new container of the “Server” type.
The container comes with a GA4 client and GA4 tags by default, so you can receive GA4 traffic straight away.
3. Choose your hosting
You can have the tagging server created automatically in Google Cloud (Cloud Run) or provision it yourself.
Google recommends running at least two instances in production, so you don’t lose data during an outage. It mentions an indicative price per server per month there, billed by Google itself.
You’ll also need a separate preview server. That’s for testing.
Alternative: don’t want to manage your own cloud? Choose a managed host such as Stape. Less maintenance, but one more supplier in your record of processing activities.
Where the server runs matters for GDPR too; see EU hosting and data residency.
4. Connect your own subdomain
Set up a subdomain such as metrics.yourdomain.com and point it to your tagging server. Or serve the container via a path on your own domain.
Only then do you get server-set cookies in a first-party context. That’s the point.
Watch out: skip this step and everything runs in a third-party context. You’ll miss a large part of the benefit.
5. Point your web container to the server
In your web container (or the Google tag), set the server URL. GA4 hits then go to your tagging server instead of directly to Google.
If you work with a data layer, it remains the source of your events and parameters. The server receives what the web container passes on.
6. Set up clients and tags in the server container
Add the right tag per platform:
- GA4, through the default GA4 client
- Google Ads conversions
- Meta, through the Meta Conversions API
- LinkedIn, if you advertise there
Send the same event to Meta via both browser and server? Then include a shared event ID so Meta can deduplicate.
Let each tag fire only when consent allows it. No exceptions.
For Google Ads, also check which conversion action actually steers the bidding:
The contact form conversion action in our own Google Ads account, October 2026. It’s set as primary, so campaigns optimise on real enquiries.
Our experience: we usually run one primary goal, the booking, and secondary goals for the steps toward it.
7. Test, go live and monitor
Test every change in preview, in both the web container and the server container.
In Google Tag Assistant you see which tags fire and with which data.
In the server container preview you see, per incoming request, which client picked it up and which tags forwarded it.
Then check in GA4, Google Ads and Meta Events Manager whether the events arrive with the right values.
After going live, monitor whether the servers stay reachable and whether your event counts remain stable.
Common mistakes with server-side tagging
Five mistakes come back in almost every setup we audit:
- No custom subdomain. The server runs on the cloud provider’s default domain, so the cookies stay third-party.
- Double counting. Old browser tags stay on next to the new server tags, or Meta gets events without a shared event ID.
- Forgetting consent on the server side. The banner works in the browser, but the server forwards everything regardless.
- One instance in production. During an outage, your data is lost until someone notices.
- Moving a messy foundation along. Server-side tagging doesn’t fix bad events or a missing data layer.
Also read the classics in common mistakes in Google Analytics tracking.
How do you check whether your server-side setup works?
In five checks, from browser to CRM:
- Open your web container preview and check in Tag Assistant whether GA4 hits leave for your own subdomain.
- Open your server container preview and look, per request, at the client, the tags fired and the status code.
- Check in GA4 DebugView whether the events arrive with the right parameters.
- Use the test events in Meta Events Manager and the conversion diagnostics in Google Ads.
- After a week, compare the event counts with your old setup and with your CRM.
How the numbers should line up is in Google Ads vs GA4 conversions.
Not sure whether your current setup is right before you start? A tracking audit first maps your existing tags, consent and data discrepancies.
When does server-side tagging pay off, and when not?
It pays off when platforms need better signals and you want strict control over shared data.
When it’s worth it
Three situations make the extra hosting and maintenance worth it:
- Serious budget in Google Ads or Meta, where better signals improve bidding
- Several platforms fed from the same events
- Strict control over which data you share
When it isn’t
For example, take a small B2B site with a handful of enquiries per month and one GA4 property.
A clean client-side setup with correct conversion tracking is often enough there. Start with that.
What our setups show
We rarely start with the server.
At Suivo the gain came from one robust form listener and a clean data layer.
At Kaizo it came from one clear conversion, the booked demo, which GA4, Google Ads and Meta see in the same way.
Server-side tagging builds on such a foundation. It doesn’t replace it. Fix the basics first.
Frequently asked questions
Is server-side tagging GDPR compliant?
Not automatically. It does give you better means to work in a GDPR-compliant way.
You see all outgoing data, can filter fields and can respect the consent status per tag. The obligation to ask for consent for analytics and advertising cookies still applies.
Do I still need a regular Google Tag Manager container?
Yes, in virtually every setup. The web container or the Google tag collects the events in the browser and sends them to your server.
The server container processes and distributes them. Read more about the basics in our article on Google Tag Manager.
Does server-side tagging bypass ad blockers?
Partly. And that isn’t the goal. Via your own subdomain, requests are blocked less often than well-known third-party domains.
But visitors who don’t give consent may not be measured with cookies on the server side either.
What does server-side tagging cost?
The costs consist of hosting (Google Cloud or a managed host) and the time for setup, testing and maintenance.
How much work that is depends on the number of platforms, your consent setup and the state of your current tracking. That’s why we work on request, after a short analysis.
What is the difference with server-side tracking for Google Ads?
Server-side tagging is the broad infrastructure for all your platforms. For Google Ads, specific techniques come on top, such as enhanced conversions and offline conversions from your CRM.
You can read about those in server-side tracking for Google Ads and setting up enhanced conversions.
Want server-side tagging set up for you?
We set it up as part of a complete measurement setup: inventory, server container, custom subdomain, consent and a test round per platform.
See how our tracking specialist works.
Want to know first where your measurement leaks today? Start with a tracking audit.
Rather discuss it straight away? Get in touch.
Free website scan
Enter your website and get an automatic scan within minutes, with concrete technical and SEO improvements. No sales pitch.
We only use your details for your scan. No spam, unsubscribe anytime.