Three months ago I switched on Cloudflare Web Analytics for HeistAtlas, a static Astro site hosted on Cloudflare Pages. The dashboard said "Automatic setup", the DNS record was proxied, cf-ray headers were on every response. Then I forgot about it.
This week I finally went to look at the numbers before deciding on ads. There were no numbers. Not low traffic, not a bot filter: zero page views for three months.
The check that should have been the first one
curl -s https://heistatlas.com/en/ | grep -c cloudflareinsights
# 0
The beacon was never injected. Cloudflare Web Analytics works by inserting a small <script> tag pointing at static.cloudflareinsights.com/beacon.min.js into your HTML at the edge. No script, no data.
Why it silently did nothing
There are two places in the Cloudflare dashboard where Web Analytics can be toggled for the same hostname, and they do different things.
- Analytics → Web Analytics → Add a site. This is the zone-level switch. It says "The JS Snippet will be automatically injected". For a normal proxied origin it works.
- Workers & Pages → your project → Metrics → Web Analytics. This is the Pages-level switch. For a site served by Cloudflare Pages, this is the one that actually injects the beacon.
If your site is on Pages and you only did step 1, you get a site entry, a site token, a green "Automatic setup" badge, and no injection. Nothing warns you. The Pages project page just quietly says "Web analytics is disabled" in a card at the bottom of the Metrics tab that nobody scrolls to.
The fix is one click and one deploy
Go to Workers & Pages, open the project, Metrics tab, scroll to the Web Analytics card, press Enable. Cloudflare creates a second site entry with a new token and tells you the change applies on the next deployment. Push anything, wait for the deploy, then:
curl -s https://heistatlas.com/en/ | grep -o 'static.cloudflareinsights.com/beacon.min.js'
# static.cloudflareinsights.com/beacon.min.js
The old zone-level site can be deleted, it never received anything.
Two things I would do differently
Verify the beacon in CI. The deploy job already runs curl against the live URL to confirm a 200. One more grep would have caught this on day one. Analytics is a dependency like any other: if you cannot see it in the response, it is not there.
Do not trust a status badge that has no data next to it. "Automatic setup" described the configuration, not the outcome. The only signal that matters is page views in the last 24 hours, and that field was empty the whole time.
If you run anything on Cloudflare Pages and set up Web Analytics from the Analytics menu instead of from the project, go check your HTML right now. It takes five seconds.












