GA4 server side tagging sends your Analytics data from the browser to a tagging server you control, usually a server-side Google Tag Manager container on Google Cloud Run, which then forwards it to GA4 and other tools. You get more control over what each vendor receives, cookies set from your own domain, and less code in the browser. It costs real money: Google estimates about $45 a month per Cloud Run server and recommends at least two. It pays off for stores and ad-heavy sites, not for a small brochure site.
GA4 server side tagging is one of those topics where the sales pitch runs ahead of the facts. I’ve heard it described as a fix for ad blockers, a way around consent banners and a guaranteed jump in conversions. It is none of those things. It is a second container, running on a server, that sits between your website and the tools you send data to.
This guide covers what GA4 server side tagging actually does, what it costs on Google Cloud, why the first-party domain matters more than anything else in the setup, and the sGTM setup steps in order. Every product detail is checked against Google’s own documentation as of November 2026. If you’re still unclear on how Tag Manager and Analytics relate in the first place, read my comparison of Google Tag Manager vs Google Analytics first, because this post assumes you know the difference.
Table of Contents
What is GA4 server side tagging?
In a normal setup, the visitor’s browser loads the Google tag and sends hits straight to Google Analytics. Every other pixel on the page does the same thing with its own vendor. With GA4 server side tagging, the browser sends one stream of hits to your tagging server instead. That server runs a server container in Google Tag Manager, decides what to do with each hit, and passes data on to GA4 and anywhere else you choose.
Google’s introduction to server-side tagging explains the moving parts. A server container doesn’t run in the visitor’s browser or phone. Incoming requests are picked up by clients, which are adapters that turn a request into events. The first client that can handle a request claims it, and that stops other clients from running on it. Triggers then check each event, and matching tags send the data onward. A Google Analytics client comes built in.

So with GA4 server side tagging you now run two containers: the web container on your site, and the server container on a cloud server. That second container is the whole point, and also the whole cost.
What does it fix, and what doesn’t it fix?
Google’s help page about server-side tagging lists the real benefits: better client performance because less code runs in the browser, full control over the data sent to third parties, the ability to remove personal data before it leaves your server, and cookies that stay within your domain when the server runs in a first-party context. Those are solid reasons. The myths around GA4 server side tagging are a different list.
| Claim you will hear | What is actually true |
|---|---|
| It makes my site faster | It can, if you move vendor pixels off the page. If every pixel stays in the browser too, nothing changes. |
| It gets around consent rules | No. Google says consent has to be set up in each container. Declined visitors stay declined. |
| It beats ad blockers | Do not plan on it. Some blockers know tagging endpoints, and dodging a visitor’s choice is not a goal. |
| It fixes my GA4 numbers | Only if the problem is cookie life or messy data. Bad event setup stays bad on a server. |
| It controls what vendors get | True. You can edit, strip or block fields before any vendor receives them. |
| It keeps cookies first-party | True, but only on your own domain. The default run.app address is third-party. |
If your main problem is that conversions don’t show up in GA4, check the basics before you buy into GA4 server side tagging. In the accounts I’m asked to clean up, the cause is usually a broken trigger, a form that reloads too fast, or consent mode set up wrong. A server will faithfully forward the same mistakes.
Who needs GA4 server side tagging, and who doesn’t?
My decision rule is simple. GA4 server side tagging is worth it when the data you send to vendors has real money or real legal risk attached to it. That usually means:
- Online stores spending meaningful amounts on Google Ads, Meta or other paid channels, where cookie life and clean conversion data change bidding.
- Businesses with strict privacy requirements that want to strip IP addresses, user IDs or URL parameters before any vendor sees them.
- Sites with many marketing pixels that slow pages down, where moving some of them to the server is a real speed win.
- Teams with someone who owns analytics and will watch the server, the bill and the data quality every month.
It is not for you if you run a five-page service site with a contact form, if nobody will look at the Cloud console after launch, or if your GA4 property still has basic event problems. For those sites, a clean web container is the better investment, and my guide to Google Tag Manager on WordPress covers that setup. If you want to avoid Google’s server container entirely, my roundup of Google Tag Manager alternatives includes the main server-side options from other vendors.
How much does GA4 server side tagging cost?
The software behind GA4 server side tagging is free. The server it runs on is not. Google’s Cloud Run setup guide gives the numbers: each server is a Cloud Run instance with 1 vCPU and 0.5 GB of memory, each one costs approximately $45 a month, and Google recommends running a minimum of two instances to reduce the risk of data loss if one fails. The sample setup autoscales between 2 and 10 servers, which Google estimates handles 35 to 350 requests per second depending on your tags.
| Cost item | What to expect (Nov 2026) | Notes |
|---|---|---|
| Production tagging servers | About $45 per server per month, minimum 2 recommended | So roughly $90 a month at the floor |
| Extra servers at busy times | Billed while they run, up to your max setting | Max instances is your worst case |
| Preview server | Small, separate Cloud Run service | Needed for preview and debugging |
| Load balancer or CDN routing | Depends on your provider | Only for the same-origin domain setup |
| Setup and upkeep time | Hours, not minutes | The cost most people forget |
Use the Google Cloud pricing calculator for your own traffic, and set a budget alert in your Cloud billing account before you go live. With GA4 server side tagging, the server bill is rarely the shock. The shock is the time it takes to map the domain, rebuild tags and test everything twice.

Where can the tagging server run?
You have more than one place to host the server container for GA4 server side tagging. Google calls Cloud Run the recommended option, but it isn’t the only one.
- Cloud Run, automatic provisioning. Tag Manager sets up the server in a Google Cloud project from inside the container setup. The fastest way to start, and you can adjust settings in Cloud Run afterward.
- Cloud Run, manual setup. You deploy the container yourself with the settings from Google’s guide. Better when you need to control regions, instance counts and billing in an existing project.
- App Engine. The older route. Google’s App Engine guide describes a testing configuration that usually costs nothing and a production configuration of 3 to 6 servers at about $40 a month each. For new setups I’d use Cloud Run.
- Managed sGTM hosting. Several third-party companies host the server container for a monthly fee and handle scaling and the custom domain. Compare their data location, uptime terms and exit options, not only the price.
- Your own cloud. The container image can run elsewhere if your team already manages servers. Only do this if someone on staff knows containers well.
Whichever host you pick for GA4 server side tagging, write down who owns the billing account. A tagging server can keep running, and billing, for months after a project ends if nobody knows which card pays for it.
Why the first-party domain matters most
This is the step that decides whether GA4 server side tagging is worth anything. Google’s custom domain guide describes three ways to point traffic at your tagging server:
| Option | Example | Server-set cookies |
|---|---|---|
| Same origin (best practice) | www.example.com/metrics | Full benefits |
| Subdomain | metrics.example.com | Full benefits |
| Default Cloud Run domain | something.run.app | None, JavaScript cookies only |
The default address runs in a third-party context, so you lose the cookie benefits that most people set this up for. A subdomain is the simplest proper setup: you add DNS records and map the domain to the service. Same-origin serving needs a CDN or load balancer to forward a path on your main domain to the server, and Google calls it the best practice because it gets the security and durability benefits of server-set cookies.
For most small and mid-size sites, I start with a subdomain. It’s quick, it gets the first-party benefit, and you can move to same-origin later if your team has CDN access and a reason to.
sGTM setup: the steps in order
This is the order I follow for a GA4 server side tagging build in server-side Google Tag Manager. It follows Google’s GA4 data stream lesson for the GA4 parts, and it assumes you already have a working web container with GA4.
- Create a server container in your Tag Manager account, next to the existing web container.
- Provision the tagging server on Cloud Run, automatically or manually, and create the preview server.
- Map your domain. Set up the subdomain or same-origin path before any real traffic arrives. Google strongly recommends installing the server on your first-party domain.
- Check the GA4 client in the server container. Keep the default GA4 paths. Google’s lesson notes that cookie handling should stay on JavaScript Managed until your domain settings are in place.
- Add a GA4 tag in the server container with default settings. It inherits the measurement ID and event parameters from the client.
- Trigger it on the GA4 client. Use a custom trigger where the built-in Client Name variable equals GA4.
- Point the web container at the server. In the Google tag, add a configuration setting named
server_container_urlwith your tagging server URL as the value. - Preview both containers and confirm hits arrive, then publish both.
- Switch to production settings: at least two instances, sensible max instances and a billing alert.
Web container > Google tag > Configuration settings Name: server_container_url Value: https://metrics.example.com
Once GA4 server side tagging works for Analytics, add other vendors one at a time inside the server container. Don’t move every pixel on day one. Each vendor has its own tag template and its own quirks, and testing them one by one is the only way to know which one broke.
Consent and privacy on a server container
GA4 server side tagging doesn’t change your consent duties. Google’s help page says that with more than one container, consent has to be initialized in each one. In practice that means your consent banner still controls the web container, consent mode signals travel with each hit, and server tags must respect them.
Where the server helps is data minimization. You can remove fields before they reach a vendor: query strings with email addresses in them, full IP addresses, internal user IDs. That’s a real privacy improvement, but only if someone actually builds those rules. A server container that forwards everything untouched is no more private than the browser setup it replaced.
If you run WordPress with Complianz, my guide to Complianz and Google Tag Manager covers the web container side of consent, which you need working before any server work begins.
WordPress notes for GA4 server side tagging
WordPress doesn’t care much where your tags send data, but a few things trip people up when you add GA4 server side tagging to a WordPress site:
- One source of the Google tag. If Site Kit, a theme setting and GTM all add GA4, you’ll send duplicate hits to the server. Pick one.
- Security headers. Google’s send data guide notes that a Content-Security-Policy must allow your server container URL for img-src, connect-src and frame-src. Security plugins that set CSP headers can silently block hits.
- Caching and minification. Exclude the GTM snippet from JavaScript delay or combine features, or your hits will start late or not at all.
- WooCommerce data layer. Server-side tagging forwards what the browser sends. If the purchase event in the data layer is wrong, fix it there first.
A quick test: open the Network tab in your browser, filter by your tagging server address, and check that GA4 requests go there instead of to google-analytics.com. Google’s lesson uses exactly this check.
Google tag gateway: the lighter option
Not everyone needs a full server container. Google now offers Google tag gateway for advertisers, which loads the Google tag from your own domain and routes some measurement requests through it, using your CDN, load balancer or web server. The setup flow lists Cloudflare, Akamai, Fastly and Google Cloud as providers.
Gateway gives you first-party loading of Google tags without running and paying for tagging servers. It doesn’t give you a place to edit data, strip fields or send events to non-Google vendors. If your goal is only more durable Google measurement and your site already sits behind Cloudflare, try gateway first, because it may be enough without GA4 server side tagging. If you need data control or several vendors, you need the server container, and Google documents using both together.
How to test and monitor after launch
Launching GA4 server side tagging is the easy part. The setup needs a short routine after go-live, or problems sit unnoticed for weeks.
- Compare totals. For the first two weeks, compare sessions and key events with the period before. A sudden drop or jump means duplicate or lost hits.
- Check DebugView and Realtime in GA4 after each change to either container.
- Watch Cloud Run logs and errors for failed requests and instance restarts.
- Keep the billing alert on. A traffic spike or bot attack raises the instance count and the bill.
- Version both containers with clear notes, so you can roll back the right one.
Common sGTM mistakes I see
- Leaving it on the run.app address, then wondering why cookie life didn’t improve.
- Running one instance to save money. If it fails, you lose data until it restarts.
- Sending hits both ways. The browser still sends GA4 directly while the server forwards the same hits.
- No owner. The person who built it leaves, and nobody can read the server container or the bill.
- Treating it as a consent workaround. That creates legal risk and doesn’t match how Google designed it.
- Moving every vendor at once, so nobody knows which tag broke conversions.
Most of these mistakes come from treating GA4 server side tagging as a plugin you install. It’s closer to a small piece of infrastructure you run.
Frequently asked questions
What is GA4 server side tagging?
It’s a setup where the browser sends GA4 hits to a tagging server you control, running a server-side Google Tag Manager container. The server processes the data and forwards it to GA4 and other vendors.
How much does a server-side GTM setup cost to run?
Google estimates about $45 a month per Cloud Run server and recommends at least two, so around $90 a month before extra servers, the preview server, any load balancer and setup time.
Do I need a custom domain for the tagging server?
Yes, for the main benefits. Google’s documentation says the default run.app domain runs in a third-party context and can only set JavaScript cookies. Use a subdomain or same-origin path.
Does GA4 server side tagging get around cookie consent?
No. Google says consent must be set up in each container. GA4 server side tagging gives you more control over data, not permission to ignore a visitor’s choice.
Is GA4 server side tagging worth it for a small business site?
Usually not. For a small service site with a contact form, a clean web container is cheaper and easier. It makes more sense for stores and sites with real ad spend.
What is the difference between Google tag gateway and sGTM?
Gateway loads Google tags through your own domain using your CDN, with no tagging server. A server container is a full tagging server where you can edit data and send it to many vendors.
Want server-side tracking set up properly?
I set up and audit GA4 and Tag Manager as part of my technical SEO service. Standard GA4 and GTM setup starts at $49, and fixes are $15 an hour. GA4 server side tagging builds depend on your hosting, domain and vendors, so I look first and quote after. If you’re not sure you need a tagging server at all, send me a note about your setup and I’ll tell you honestly.
