Expert Tip - Cloudflare Browser Insights

For our first Birthday Week release, we have a new tool that measures the performance of your website. Understand how visitors experience your site’s performance with Cloudflare Browser Insights!




Good Job, really great tool.

also seeing that its not triggering for every page load wonder if its intended

Hi @boynet2, it’s actually intended to be a random sampling. I pulled this quote from our guide that explains it a bit better, “Browser Insights does not insert the beacon on every page load. Instead, it inserts a beacon in a random sample of web pages and uses the information collected to estimate the amount of traffic and performance of your web pages. At this time, you cannot change the sampling rate.” However, that’s a great suggestion for future iterations!


It would be nice if you included an SRI hash in the script tag. This would enable setting a CSP policy like “require-sri-for script”. (and serve the script through cdn-cgi, rather than a separate domain)

The resulting tag would be something like:

<script defer src="/cdn-cgi/beacon.min.js" integrity="sha384-dVkfmIJSf0iQkm2JK/jC5m5q6UWpM5TsgFN8V+vC/tOKJXRxdphxU8UaE1H82tni" crossorigin="anonymous"></script>


Can you say how big the sample is that Cloudflare uses? (Am asking for a Pro plan, if that matters.)

I ask because, if the sample size is say 10%, then I can exclude countries with less than a certain number of page views from my analysis. That way I don’t make conclusions on too small samples.

1 Like