I host a small static site on Cloudflare Pages. After enabling analytics, I opened the Pages dashboard, found the metrics tab, and saw nothing. Zero visitors, zero pageviews, flat lines. For days.
I assumed the tracking snippet had failed to load. It had not. I was just looking at the wrong set of numbers.
Pages metrics vs Web Analytics
Cloudflare has two different things that both look like "analytics" on a Pages project:
- Functions metrics — invocation counts, CPU time, errors for serverless functions
- Web Analytics — actual visitors, pageviews, referrers
My site is fully static. There are no functions. So the Functions metrics page was completely empty by design, and I had been staring at it wondering where my traffic went.
The real numbers live under the Web Analytics section of the Cloudflare dashboard, in a completely different menu. Once I found it, the visitor count was right there.
Checking the snippet is still worth it
To be safe, I verified the beacon was actually firing. Cloudflare injects a script from static.cloudflareinsights.com and ties it to a web analytics token. If that script is in your page source and the token matches the one in your dashboard, you are good.
One gotcha: Cloudflare's CDN can serve a cached version of your HTML that predates the snippet. After enabling Web Analytics, purge the cache and hard-reload. I have seen the "is the snippet there" check give contradictory answers across two requests purely because of edge caching.
The takeaway
If your Cloudflare Pages metrics are all zero and you run a static site, check that you are on Web Analytics, not Functions. It is an easy ten seconds and saves a lot of unnecessary debugging.
Top comments (0)