[Help] "No 'Access-Control-Allow-Origin' header" Error for Web Analytics of website hosted on Cloudflare Pages

I hosted my static website https://apsarasx.com on Cloudflare Pages with custom domain and added Web Analytics.

But when I visited the website, I encountered a CORS error like the following.

The request header and response header of the data sent to https://cloudflareinsights.com/cdn-cgi/rum are as follows.

It seems that some fields like Access-Control-Allow-Origin are missing in the response header.

Hope to get help from Cloudflare Team.

I and many others have the same problem but for me it is working on :+1: https://defihq.pages.dev/ but not on :-1: https://s.siloco.xyz/

1 Like

Cloudflare web analytics seems to be hard to use. :rofl:

This page is hosted on Cloudflare pages: https://s.siloco.xyz/
I’ve enabled Cloudflare web analytics and I get this 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). Status code: 200.

it is working on :+1: https://defihq.pages.dev/ but not on :-1: https://s.siloco.xyz/

What can I do?

Getting the same issue myself.

Same issue for me, too.

BTW I am using a service worker.

Hello, evenryone.

After I waited for three days without any action, Cloudflare’s web analytics finally works well.

But I don’t know why.