Google Tag Gateway Tutorial – Pros & Cons + Step-by-Step Setup

Loves Data · Beginner ·📣 Digital Marketing & Growth ·10mo ago

Key Takeaways

Sets up Google Tag Gateway with Cloudflare and Google Tag Manager

Full Transcript

Hey there, I'm Benjamin from Love Data. In this video, we're going to take a closer look at Google Tag Gateway. You'll learn what it is, the pros and cons, and I'll also walk you through the steps to set it up using Cloudflare with Google Tag Manager. I'll also share some of my own findings, including why I don't currently recommend Tag Gateway as a way to bypass ad blockers, but why it can still be worth using to improve your data accuracy. You might be wondering, what is Google Tag Gateway? Google has introduced this feature, so your Google tags load from your own domain instead of Google's. This turns them into first-party tags, and it works with Google Analytics, Google Ads, and Google Tag Manager. Normally, these tags are loaded from external domains like googletagmanager.com. The problem with this is that many browsers and ad blockers will block or restrict third-party scripts, which means your analytics and ad tracking can miss important data. But with Google Tag Gateway, those same tags load from your own website's domain. In this example, we can see the tags are now loaded from the same domain instead of the external Google domain. This can help improve data collection. Before we cover the setup steps, let's look at the pros and cons of Google Tag Gateway. Benefits include, if you're already using Cloudflare, it's easy to set up and it only takes a few steps. There are no extra costs, so unlike server-side tagging, you don't need a separate server. It can improve data accuracy. In a test I ran, I saw an improvement of almost 7% in the number of users being reported compared to a standard setup. But there are also some limitations. This includes minimal impact on ad blockers. I'm currently researching this, and from what I've seen so far, Tag Gateway doesn't do much to get around ad blockers. So I don't recommend using it for that purpose right now. If you're already running server-side tagging with GTM, you don't need to use Tag Gateway. So that means it's not always necessary. And if you're not using Cloudflare, setup can be more complex. And it only works for Google tags, so it won't help with third-party tags. If you'd like me to create a follow-up video showing how you can reduce the impact of ad blockers, please let me know in the comments below. Overall, if you're using Cloudflare and you're not using server-side tagging, I recommend setting up Tag Gateway. It's quick and easy to enable, plus it can improve the accuracy of your data. Okay, now let's walk through the steps to set up Tag Gateway using Cloudflare. Let's head to Google Tag Manager. Before you follow these steps, you'll need to make sure your website's domain has already been added to Cloudflare. If your domain isn't already set up with Cloudflare, I recommend doing that first. Now we need to navigate to admin. Under container, at the very bottom, we can see Google Tag Gateway. Let's select this. Now let's click continue. If we click the arrow to the right of the first step, we can see the measurement path that will be used for our tags. This is where the tags will be served from on our website. The main thing to check is that this path isn't already being used for something else on your website. If it is, then you should change it. Like the path that's suggested, I recommend using something that's random. So something that isn't obviously used for tracking or measurement. Since I'm not currently using this path on my website, I can continue to the next step. This is where we authorize access to Cloudflare. Let's click sign in to Cloudflare. You'll now need to enter your email address and password for Cloudflare, and log in. Now we need to click allow. We're taken back to Google Tag Manager. And we need to click choose domains. You'll need to select your domain. If you have multiple domains added to Cloudflare, then just select the same domain you've installed the Google Tag Manager container on, and click done. We can now see the domain we've selected, so let's click complete setup. Google Tag Gateway is now active, and Cloudflare will automatically add some additional code to our website to ensure Google Tag Gateway is configured. Let's open a page on my demo site to see this. And let's right-click to view the source code. We can see the extra code Cloudflare has added for our Google Tag Gateway configuration. One last thing I recommend is adjusting your Google Tag Manager container code. This is because the container code still uses the googletagmanager.com domain. We can see the measurement path included in the code that Cloudflare added. Let's copy this. Now let's edit the code for this page on my demo site. We can see the default Google Tag Manager container, so we just need to edit this. We're going to remove the full domain used for the container, including the gtm.js. And we're going to replace this with our measurement path. Now let's save this. And let's open Tag Assistant. Now we can connect to the page on my demo site. The page loads. And let's open the Tag Assistant tab. Now let's select the Google Analytics tag that fired. And let's open the page view hit. We can see this hit has been collected using our measurement path, so we know everything is working correctly. Our Google tags are now running through Google Tag Gateway. From what I've seen so far, it's not going to solve the issue of ad blockers, but it is a straightforward way to improve the reliability of your Google Analytics and Google Ads tracking. Remember, if you're already using server-side GTM, you don't need to use Tag Gateway. But if you're not and you have access to Cloudflare, then it's definitely worth setting up. And please let me know in the comments if you'd like me to create a follow-up video showing how you can reduce the impact of ad blockers. If you'd like to learn more about advanced tagging, you can check out my Google Tag Manager course. I've included a link in the description below. Thanks for watching, and I'll see you in the next video.

Original Description

Learn how to set up Google Tag Gateway (also known as First-Party Tags) step-by-step. In this tutorial, I’ll explain what Tag Gateway is, the pros and cons, and show you exactly how to configure it with Cloudflare and Google Tag Manager. Google Tag Gateway lets your Google tags, including Google Analytics, Google Ads, and GTM, load from your own domain instead of Google’s. This makes them first-party tags, which can help improve tracking reliability and reduce data loss caused by third-party script blocking. In this video, you’ll see: • What Google Tag Gateway is and how it works • The key benefits and limitations (including why it doesn’t solve ad blocker issues) • When to use Tag Gateway vs. server-side GTM • Step-by-step setup using Cloudflare and GTM • A practical tip to check your setup and confirm data accuracy From my own testing, I’ve seen Tag Gateway improve reported users by nearly 7% compared to a standard setup. It’s quick to enable if you’re using Cloudflare and can make your Google Analytics and Ads data more reliable. 📌 If you’d like me to create a follow-up video on advanced options for reducing the impact of ad blockers, let me know in the comments. ➡️ Check out my Google Tag Manager Course for more advanced tagging tutorials: https://www.lovesdata.com/courses/google-tag-manager/ JUMP TO A TOPIC: 00:00 Introduction 00:52 What is Google Tag Gateway? 01:38 Tag Gateway pros and cons 03:17 Setting up Tag Gateway in GTM 07:04 Conclusion TOOLS WE USE AND RECOMMEND: ○ Data connector – https://lovesdata.co/oOWkI ○ Cookie banner – https://lovesdata.co/letON ○ Email platform – https://lovesdata.co/zrLd7 ○ Course platform – https://lovesdata.co/2Zzfq Join our courses: https://www.lovesdata.com/courses/ Subscribe for more: http://www.youtube.com/subscription_center?add_user=lovesdata
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Related Reads

📰
Best SaaS SEO Agencies: Top-Rated US B2B Organic Growth Firms in 2026
Discover top-rated US SaaS SEO agencies for B2B organic growth in 2026 and learn how to evaluate them based on Clutch profiles and case studies
Medium · SEO
📰
🚀 Why I Decided to Build MarcoPixcel: An AI Platform for Creators, Agencies, and Growing Businesses
Learn how MarcoPixcel's AI-driven chat automation helps businesses convert leads and reduce losses due to delayed responses
Dev.to AI
📰
Building Reliable Barcode Lookup for a Nutrition App
Learn to build a reliable barcode lookup system for a nutrition app, enabling accurate product identification and nutrition information retrieval.
Dev.to · Dietly
📰
Why Fuzzy Search Alone Produces Bad Food Results
Fuzzy search alone can lead to poor results, especially with food items, and string similarity can help rescue typos but has limitations
Dev.to · Dietly

Chapters (5)

Introduction
0:52 What is Google Tag Gateway?
1:38 Tag Gateway pros and cons
3:17 Setting up Tag Gateway in GTM
7:04 Conclusion
Up next
How to Sell Websites With Lovable | Make Money Easily (UPDATED)
Tutorial Stack
Watch →