Video tutorial · Server-side Google Tag Manager

Install Google Tag Manager server-side with Stape and send GA4 through it

20 minAugust 2024By John BernalWatch on YouTube
In shortThis tutorial sets up server-side Google Tag Manager on Stape.io, a managed host, and sends GA4 through it. You create the containers, map a subdomain, point the GA4 Google tag at it, test and publish.

What you need before you start

Steps covered in the video

  1. Create a container in Stape.io.
  2. Create a server-side GTM container.
  3. Map the 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. Publish both containers.

Common questions

Why use my own subdomain?

Data sent to a subdomain of your site (for example data.yoursite.com) is treated as first-party by browsers, so cookies last longer and fewer requests get blocked.

Resources

Recorded in August 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.