How to disable Cloudflare's Google Tag Gateway for specific pages of my website?
06:19 18 Aug 2025

After I activate Google Tag in Cloudflare with Google Tag Gateway for Advertisers, it is being inserted to all pages of my website. I want to exclude it on some pages of my website (like, admin UI).

Here's the HTML code with a snippet Cloudflare inserts:




  
  
  
  
  
  ...

...

Basically same issue asked here, however the solution didn't work, and the question is locked. There's currently no option to exclude some paths in Cloudflare dashboard, unlike in in Cloudflare Web Analytics.

Cloudflare Google Tag Setup: Cloudflare dashboard screenshot

I want to be able to manually insert the GTM code snippet Cloudflare if possible, to protect it from html blocking. One idea I have is to process the HTML code with Cloudflare worker, but Cloudflare seems to inject GTM after the worker generates a response.

Is there any better/cleaner approach to remove the snippet from the HTML code than processing it with a Cloudflare worker, or to set up a server-side Google Tag via Cloudflare with the ability to manually insert GTM's JavaScript snippet on pages?

google-tag-manager cloudflare google-tag-manager-server-side