Analytics - status code and always online

In the description of the Web Analytics feature it says that I can "See visits, page views, requests, status codes, and more across all your project’s domains" but when I go to the analytics I can't see the status code. On a similar topic - how can I see the stats regarding cases of visitors seeing the top banner that says "This website ..... is currently offline. Cloudflare's Always Online shows a snapshot of this web page from the Internet Archive's Wayback Machine. To check for the live version, click Refresh"? Not that I understand how can it really happen when the website is hosted by cloudflare pages....
1 Reply
Chaika
Chaika12mo ago
Web Analytics is a Javascript beacon like Google Analytics which runs on the visitor's browser and reports stats back to Cloudflare. It's great for client-side statistics like page load time, web vitals, etc. What you are looking for though is more Server-side analytics, which you can find under your domain/zone within Cloudflare. This is better for tracking status codes and such as there's no need for the client to execute Javascript, every request is logged and will have its status code collected. There is a "Status Codes" tab if you are on free: https://dash.cloudflare.com/?to=/:account/:zone/analytics/traffic. If you're on Paid Web Traffic Analytics, you can filter by Edge Status Code. As far as I can see, Web Analytics themselves doesn't collect status codes, and it probably wouldn't be what you want anyway, as if you are using the Pages Integration and Pages is down fully, it wouldn't be able to serve the Web Analytics Javascript at all, so you wouldn't see those codes to begin with. I don't think there's any analytics for Always Online, other then checking status codes. Always Online only triggers for specific status codes, I believe 502, 504, 521, 523, 522, 524, 525, 526, and 520. It won't trigger for 404s, or generic errors like 500, 503 https://developers.cloudflare.com/support/troubleshooting/cloudflare-errors/troubleshooting-cloudflare-5xx-errors/ If your origin responds with one of those errors, Always Online could execute. Like you said though, not too likely to happen with Pages