Custom domain with Cloudflare Pages: web analytics integration


First, I want to thank you for the great product you are building!

I just setup up my blog on Cloudflare Pages ( and I wanted to use Web Analytics to get some stats on the my website. To do so, I enabled the support of Web Analytics in my Cloudflare Page settings.

It created an entry for in the Web Analytics portal. As my website is built with Gatsby (SPA), I had to add the on the client-side to get proper analytics.

The problem now is that the request is being blocked by CORS since my website is and not The current solution I found was to create a new analytics project for but it would be much easier if web analytics could support multiple domains or the CORS is properly configured to allow both and

I hope this is clear :slight_smile:

Thanks a lot,
Charles Vandevoorde