How to stop Cloudflare from injecting beacon.min.js

Natt, Design Engineer (3 days ago)2 min read

Have you tried turning it off and on again?

— Roy, The IT Crowd

If you ever add a domain to Cloudflare, you may notice from the network tab that beacon.min.js is automatically being injected into your website. That is the script for Cloudflare's Web Analytics, which has been enabled by default on free domains since October 15, 2025.

If you want to turn it off, you can do so by turning on web analytics and turning it back off.

  1. [Sidebar]: Domains -> Overview (https://dash.cloudflare.com/{ORG}/domains/overview)
  2. Select your domain
  3. [Sidebar updated]: Analytics -> Web Analytics (https://dash.cloudflare.com/{ORG}/{DOMAIN}/dashboards)
  4. The page says it's off, but you're going to turn it on by clicking on "Enable Globally"
  5. Refresh the page
  6. Scroll down until you see "View Web Analytics sites" under "Quick Actions" (https://dash.cloudflare.com/{ORG}/web-analytics/sites)
  7. Click on your "Manage site" in the domain card. Note: if you click on the card itself and not the manage site link, it will go to a different page.
  8. Under "Real User Measurements (RUM)", select "Disable" and click "Update"

That should turn it off but the script is cached. If you want to see it removed right away, you can purge the cache.

  1. [Sidebar]: Domains -> Overview (https://dash.cloudflare.com/{ORG}/domains/overview)
  2. Select your domain
  3. [Sidebar updated]: Caching -> Configuration
  4. Click on "Purge Everything"

Voila! You should now see that beacon.min.js is not being injected into your website.