Video tutorial · Server-side Google Tag Manager

Install Google Tag Manager server-side on Google Cloud

20 minSeptember 2024By John BernalWatch on YouTube
In shortThis tutorial installs a server-side Google Tag Manager container on Google Cloud (Cloud Run), connects it to your own subdomain and sends a GA4 page view through it. It ends with upgrading the server to production and publishing both containers.

What you need before you start

Steps covered in the video

  1. Create a server-side GTM container.
  2. Turn on the Google Cloud APIs Cloud Run needs.
  3. Map a server subdomain in your DNS manager.
  4. Add the subdomain to the server container and to the website container, through the GA4 Google tag.
  5. Test a GA4 page view.
  6. Upgrade the server to production.
  7. Publish the website and server containers.

Common questions

Google Cloud or Stape?

Google Cloud gives you full control and you pay Google directly. Stape is a managed host that is quicker to set up. Both run the same server-side GTM container. There's a Stape version of this tutorial too.

Resources

Recorded in September 2024. 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.