
In shortIf your server-side GTM runs on Google Cloud, this tutorial puts it behind your own subdomain using a global external Application Load Balancer. You reserve a static IP, point a DNS record at it, create a Google-managed SSL certificate, connect the Load Balancer to your Cloud Run service and test it.
Chapters
What you need before you start
- A server-side GTM container already running on Google Cloud
- Project Owner or Editor in Google Cloud (or Compute Network Admin, Compute Instance Admin and Security Admin)
- Access to your DNS manager
- Editor, Publisher or Owner access in Google Tag Manager
- The Compute Engine and Certificate Manager APIs turned on
Steps covered in the video
- Reserve a global static IPv4 address on the Premium network tier.
- Add an A record for your subdomain that points to that IP. Avoid obvious names like 'tracking', which some ad blockers look for.
- Create a Google-managed SSL certificate for the subdomain.
- Create a global external Application Load Balancer.
- Front end: HTTPS on port 443 with your IP and certificate, plus the HTTP to HTTPS redirect.
- Back end: a serverless network endpoint group pointing to your Cloud Run GTM service.
- Routing rule: your subdomain, path /*, to that back end.
- Add the subdomain in the server container settings and check /healthy and Tag Assistant.
Common questions
Why not use Cloud Run's own domain mapping?
Cloud Run domain mapping isn't available in every region. A Load Balancer works everywhere and also gives you monitoring of the traffic.
Resources
Recorded in September 2025. Some screens may look different today.
Related videos
19:46Install Google Tag Manager server-side on Google Cloud
Run your own tracking server on Google Cloud Run, step by step.
September 2024
20:09Install Google Tag Manager server-side with Stape and send GA4 through it
The quickest way to get server-side GTM running, with GA4 on top.
August 2024
10:45Build a server-side GTM tag template that sends data to any endpoint
Send conversions to a platform with no ready-made GTM tag.
September 2024