In a server-side GTM setup, the Google tag on your site sends its requests to a tagging server on your own domain instead of straight to Google. A server container there decides what reaches GA4 and Google Ads. On Google Cloud Run, live traffic needs 2 or 3 servers at about $45 a month each. A managed host such as Stape charges $20 a month on its Pro plan.
What the finished setup does
When a patient books on a made-up dental practice's site, the page's Google tag sends one request to sgtm.brightsmile-dental.example, the practice's own tagging subdomain. The GA4 client there, the part that reads Google Analytics requests, claims it and turns it into an event. Two server tags then pass that event to GA4 and Google Ads.
Start here
Stand the server up
Check 1: Create the server container
Check 2: Pick where the tagging server runs
RUN_AS_PREVIEW_SERVER=true) and as a tagging cluster whose PREVIEW_SERVER_URL points at it.gcr.io/cloud-tagging-10302018/gtm-cloud-image:stablerun.app URL on Cloud Run or the one your host gives you, returns ok at /healthy.| Route | Price on the provider's page |
|---|---|
| Cloud Run, 2 or 3 servers | About $45 per server a month (Cloud Run guide) |
| Load balancer for your domain | $0.025 an hour for up to 5 forwarding rules, plus data (network pricing) |
| Stape Pro, a managed host | $20 a month, or $17 a month billed annually, for up to 500K requests (Stape pricing) |
At the rates above, one always-on server with 1 vCPU and 0.5 GiB comes to about $49 for a 30-day month once the free tier is used up. I budget with that, not Google's $45.
Check 3: Size server-side GTM on Cloud Run for live traffic
Check 4: Give the server your own domain
run.app address, Google's table says the server "can only set Javascript cookies," so give it your own domain. A path such as /metrics on your main hostname, routed through a CDN or load balancer, keeps Safari cookies longer than a subdomain. A subdomain such as sgtm.example.com, separate from the one serving your site, is simpler to set up (custom domain guide). Paste the URL into Server container URL.https://sgtm.example.com/healthy answers ok, and server Preview opens the debugger./. That page marks a global external Application Load Balancer as the recommended route.Route the tags through it
Check 5: Point the web Google tag at the server
server_container_url, value your URL from check 4. Select it under Configuration settings in your Google tag, trigger the tag on Initialization - All pages and save (Google's steps).collect requests go to your tagging domain, not to google-analytics.com.img-src, connect-src and frame-src. If a diagnostic asks for a Google tag, add one with your tag ID (Google tag setup).Check 6: Turn on GA4 server-side tracking
collect?v=2 request names the GA4 client in its Client box and lists the GA4 tag under Tags Fired. Its outgoing request shows a 2xx status (debugger guide).Check 7: Set up Google Ads server-side tracking
book_visit (Ads setup).user_data parameter on the web Google tag to a User-Provided Data variable.Check 8: Confirm consent reaches the server
ad_storage denied, the Ads tag neither writes nor reads Google Ads cookies. With analytics_storage denied, no Analytics cookies are set on the client or the server. Enhanced conversions need consent granted.Prove it, then publish
Check 9: Preview both containers in one browser
Check 10: Test the live path after publishing
What stays out of the container
Offline conversion uploads. A booking turns into a kept visit days later, in a scheduler the tagging server never sees. An upload also needs memory across runs, so I run it as a scheduled job instead.
Tags
Frequently asked questions
When does the free server-side GTM server start to cost money?
The single server that automatic provisioning creates is free in most cases, but Google calls it fit for testing only. Per Google, it starts billing when other projects on the same billing account push it past the free tier, or when its traffic exceeds the free-tier limits. For live traffic, Google's Cloud Run guide puts each server at about $45 a month and recommends at least 2; its server-side overview says 3. A load balancer for your domain and request logging past about a million requests a month cost extra.
Do I still need a web container with server-side Google Tag Manager?
Yes. The web container's Google tag receives the event and the visitor's consent choice from your banner and sends both to your tagging server. Google says consent mode only needs setting up in the web container, because the Google tag adds the consent state to its requests to the server.
Can the GTM server container run outside Google Cloud?
Yes, through manual provisioning. Google ships the tagging server as one Docker image that runs on other clouds or your own hardware, as one preview server plus a cluster of tagging servers. Google also warns that the owner of that environment may have access to your data, so read the host's terms first.
How do I keep the tagging server up to date?
Google's release notes list each tagging server image; version 4.6.0 came out on October 29, 2026, as a security update. On Cloud Run, deploy a new revision with the stable image when Tag Manager prompts you. On a manual host, Google says to restart the servers periodically to pick up code updates; publishing the container does not need a restart.
Written by
Marketing Analytics & Conversion Tracking Engineer, US and Canada, run remotely
- Media buyer on Google Ads and Meta Ads from October 2023 to September 2025, nearly $700K in spend.
- Set up patient conversion tracking for a New York medical practice (anonymized).
- Upwork Top Rated Plus, 5.0 from 20 reviews.