Video tutorial · Server-side Google Tag Manager

Map a custom subdomain to server-side GTM on Google Cloud with a Load Balancer

17 minSeptember 2025By John BernalWatch on YouTube
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

Steps covered in the video

  1. Reserve a global static IPv4 address on the Premium network tier.
  2. Add an A record for your subdomain that points to that IP. Avoid obvious names like 'tracking', which some ad blockers look for.
  3. Create a Google-managed SSL certificate for the subdomain.
  4. Create a global external Application Load Balancer.
  5. Front end: HTTPS on port 443 with your IP and certificate, plus the HTTP to HTTPS redirect.
  6. Back end: a serverless network endpoint group pointing to your Cloud Run GTM service.
  7. Routing rule: your subdomain, path /*, to that back end.
  8. 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.

JB
John Bernal

Tracking and analytics consultant with 10+ years setting up GA4, Google Tag Manager, server-side tracking and ad platform conversions. Stape partner, Top Rated Plus on Upwork. About AnalyticsEngine

Related videos

Rather have someone set it up and keep it working?

Tracking & Analytics Ops is $500 a month per website. I set up your tracking, check it every day, fix what breaks and answer your analytics questions. AI does the daily checks; I make every decision.