I'm trying to add GA4 analytics to a website, which previously had UA analytics. I've added the new GA4 code snipper beneath the <head>
tag as instructed.
The following errors (and a few others with a similar message) are appearing in the console, and I'm not sure what I'm doing wrong:
Refused to load the script 'https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXX' because it violates the following Content Security Policy directive: "default-src 'self' 'unsafe-eval' 'unsafe-hashes' 'unsafe-inline' data: blob:". Note that 'script-src-elem' was not explicitly set, so 'default-src' is used as a fallback.
analytics.js:34 [Report Only] Refused to connect to 'https://www.google-analytics.com/j/collect?XXXXX' because it violates the following Content Security Policy directive: "default-src 'self' 'unsafe-eval' 'unsafe-hashes' 'unsafe-inline' data: blob:". Note that 'connect-src' was not explicitly set, so 'default-src' is used as a fallback.
Any help or pointers in the right direction are massively appreciated!