How can I stop the Beacon JavaScript from being inserted automatically?

My Angular PWA offline mode breaks when the Beacon JavaScript is inserted automatically (because the Angular hash doesn't match the hash of the content served). I've tried adding the snippet manually and setting no-transform (Cache-Control: public, no-transform), but it is still inserted. There is no advanced settings option (as described in the docs), so I'm stuck. Any suggestions please?
3 Replies
Erisa
Erisa6mo ago
Check under https://dash.cloudflare.com/?to=/:account/pages/view/:pages-project/manage whether web analytics is enabled on the Pages project. That integration is automatic so unfortunately you would have to disable it and manually create a new JS snippet in the Web Analytics dashboard if you wanted to inject it manually
Joe Simpson
Joe Simpson6mo ago
I tried exactly that, but the snippet didn't work because WA was disabled so I thought about adding a new site to WA manually, but my pages site wasn't in the list of options in the drop down so far, I've not found a way to make it work so I've disabled WA any other suggestions @Erisa | Support Engineer. Is this a known issue/limitation that is on the roadmap for fixing?
Erisa
Erisa6mo ago
You can still add domains that aren't in the dropdown, just type it and press enter. It may make some remark about it not being a Cloudflare website but that can be safely ignored
Want results from more Discord servers?
Add your server