Google Tag Gateway with Cloudflare: Setup and Benefits

Google Tag Gateway with Cloudflare: Setup and Benefits: Server-side & consent article cover from AnalyticsLiv

In short

Google tag gateway for advertisers serves Google Analytics, Google Ads and Tag Manager tags from your own domain, so they load and send data as first-party requests. On Cloudflare you turn it on from Tag Manager's Admin section in a few clicks, at no cost and without a server. It is simpler than server-side tagging but gives less control.

Contents6 sections

Talk to a specialist

What is Google tag gateway?

Google tag gateway for advertisers lets you serve your Google tags (Google Analytics, Google Ads and Tag Manager) from your own website domain instead of Google’s, so scripts load and measurement data is sent in a first-party context. If your site runs on Cloudflare, you can switch it on from Google Tag Manager in a few clicks, without managing a server. Cloudflare offers the feature free of charge.

Ad blockers and browser privacy restrictions can cost you website data. Because tag gateway routes tags through your own domain, the requests are first-party rather than third-party, which Google says can improve measurement and lead to more recorded conversions.

Why use Google tag gateway with Cloudflare?

  • More complete data: Google tags are served from your own domain, as first-party requests.
  • Fast delivery: tags are served through Cloudflare’s network, which already sits in front of your site.
  • No server to run: unlike server-side tagging, there is no separate server to set up, pay for or maintain.
  • Quick setup: the automated setup in Google Tag Manager connects to Cloudflare for you, with no need to re-tag your site.
Google tag gateway for advertisers serving Google tags through Cloudflare on the site's own domain

When should you set up Google tag gateway?

It makes sense when you use Google Analytics or Google Ads, your site already runs on Cloudflare, and you want more accurate data without a complex setup. You get first-party tag serving and better measurement in a few clicks, without managing your own tagging server.

How is Google tag gateway different from server-side tagging?

FeatureGoogle tag gateway (Cloudflare)Server-side tagging
SetupEasyMore complex
HostingUses Cloudflare, which already serves your siteNeeds your own tagging server (server-side GTM)
Control over dataLimited: tags behave as beforeFull: you can change or filter data before it reaches vendors
Tag executionTags still run in the browser, routed via your domainTags run on your server
Best forMarketers and quick deploymentsDevelopers and custom logic

The two can work together: Google recommends combining tag gateway with server-side tagging for the most durable setup.

How do you set up Google tag gateway with Cloudflare?

You need a Google Tag Manager container already installed on your website, and access to the Cloudflare account that runs your domain.

  1. Open the Google Tag Manager container you want to connect, go to Admin and click Google tag gateway.
Google tag gateway option in the Google Tag Manager Admin section
  1. On the next screen, click Continue. The automated setup is selected by default.
Google tag gateway setup screen with the Continue button
  1. Click Sign in to Cloudflare.
Sign in to Cloudflare button in the Google tag gateway setup
  1. Enter your Cloudflare login details and grant Google permission to connect.
Cloudflare login screen
  1. Click Complete setup. Google tag gateway is now connected to your website and its status should show as active.
Complete setup button in Google tag gateway

How do you check that it works?

Right-click on your website and select “View page source” (or press Ctrl+U). Look for the script tag that loads Google Tag Manager: it should now load from your own domain’s measurement path. For example, if your measurement path is example.com/abc, you should see “/abc” in the page source. If you don’t see it, refresh the page.

Page source showing the Google Tag Manager script loading from the site's own measurement path

You can also open Tag Assistant and check that hits are sent to your measurement path.

Conclusion

Google tag gateway with Cloudflare is a quick, low-cost step toward more accurate, first-party tracking. It moves your Google tags onto your own domain without the work of running a server, and it can later be combined with server-side tagging if you need more control.

Frequently asked questions.

Ask us your own question

A feature that serves Google tags from your own website domain instead of Google's, so scripts load and measurement data is sent in a first-party context.

Cloudflare offers Google tag gateway for advertisers free of charge.

No. Tag gateway routes tags through your domain while they still run in the browser. Server-side tagging runs tags on your own server and gives full control over data. Google recommends combining them for the most durable setup.

Need tracking that holds up without third-party cookies?

Talk to the team that sets up server-side tagging, Conversions API and consent mode for clients.