Trying to test out cloudflare analytics.
Set up site in cloudflare and got the javascript tag and put in header.
Loading site now triggers an error
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://cloudflareinsights.com/cdn-cgi/rum. (Reason: CORS header 'Access-Control-Allow-Origin' missing).
I have added an Access-Control-Allow-Origin header to the page which is set to https://cloudflareinsights.com but this does not seem to have helped.
The site is running on an http/2 server with referrer policy strict-origin-when-cross-origin.
Does anyone have any thoughts on how I can resolve this issue?
Hi, looks like we have a bug on our end. Until this is fixed, after adding your custom domain on Pages, please disable and re-enable Web Analytics so that your new custom domain is allowed in the Web Analytics. Sorry for the inconvenience.
If you are seeing CORS error, that means Web Analytics has not been updated to receive payload from your domain. Please see https://developers.cloudflare.com/analytics/faq for better understanding.