Cloudflare Analytics provides a comprehensive way to monitor who is visiting your website, how they are engaging with it, and what performance or security issues they may be facing. Unlike traditional analytics that rely heavily on client-side scripts, Cloudflare Analytics operates at the edge network level, offering accuracy even for traffic that might be blocked by ad blockers.
This guide explains how to access these metrics, understand the data provided (such as Core Web Vitals and traffic requests), and utilize advanced tools like the GraphQL API for deeper insights.
Cloudflare Web Analytics is designed to be privacy-first; it does not track individual users, use client-side state like cookies for analytics purposes, or track users across sites via IP addresses.
If your website is already proxied through Cloudflare (meaning your DNS records have the orange cloud enabled), basic analytics tracking is often enabled automatically without requiring code changes.
To access the dashboard:
1. Log in to your Cloudflare dashboard.
2. Select the specific domain you wish to monitor.
3. Navigate to the Analytics & Logs tab in the sidebar.
For Web Analytics (which focuses on user experience and Core Web Vitals), Cloudflare adds a lightweight JavaScript beacon to your pages. This feature is enabled by default for free domains, but for Pro, Business, and Enterprise accounts, you can enable it by selecting Automatic Setup or manually adding the snippet to your HTML.
While basic traffic data is available immediately, sites on paid plans (Pro and above) gain access to historical data extending back weeks or months, whereas free plans may be limited to shorter timeframes like 24 hours.
The main analytics dashboard organizes data into several critical categories that help you monitor infrastructure health and usage.
Traffic and Bandwidth You can monitor the total number of Requests (HTTP/HTTPS) and Bandwidth transferred. Crucially, this data is split between cached and uncached traffic. A high percentage of cached bandwidth indicates that Cloudflare is effectively reducing the load on your origin servers.
Visitor Geography The Traffic by Country section helps you identify where users are located. This is essential for optimizing CDN configurations for specific regions or detecting unexpected traffic sources that might indicate bot activity or DDoS attacks.
Status Codes Monitoring HTTP status codes allows you to catch errors early. A spike in 5xx errors typically indicates origin server problems, while an increase in 4xx errors may signal broken links or API issues.
Cloudflare Web Analytics uses Real User Monitoring (RUM) to measure how real visitors experience your site. This goes beyond server-side logs to track client-side performance metrics.
Core Web Vitals The analytics dashboard reports on critical metrics such as Largest Contentful Paint (LCP) (loading speed), First Input Delay (FID) (interactivity), and Cumulative Layout Shift (CLS) (visual stability).
Page Load Time You can view general load time metrics associated with server processing and TLS handshake duration from the perspective of the client. This helps you understand if slowness is caused by the network, the server, or the client's browser.
If you see a sudden drop in your cache hit ratio in the real-time dashboard, it often indicates a configuration change that has broken caching, which requires immediate investigation.
For deeper performance debugging, Cloudflare offers Timing Insights via the GraphQL Analytics API. This allows you to drill down into what contributes to "Time to First Byte" (TTFB), which is essentially a timer from when a client sends a request until they receive the first byte of the response.
Using the httpRequestsAdaptiveGroups dataset, you can query specific metrics including:
• Edge Time to First Byte: The time elapsed processing the request at the edge.
• Origin DNS Lookup Time: How long it took Cloudflare to resolve the CNAME to reach your origin.
• Origin Response Time: How long it took to reach and receive a response from your origin server.
This level of detail helps distinguish whether a slowdown is caused by Cloudflare's edge processing or your own origin server's response time.
To move from reactive to proactive monitoring, you can configure Cloudflare Notifications. These can alert you when specific thresholds are breached, such as:
• Traffic Anomalies: Spikes in requests that exceed a baseline.
• High Error Rates: Increases in 5xx errors indicating server failure.
• Security Events: Notifications when firewall rules block suspicious traffic.
You can integrate these alerts into your incident management workflows by configuring delivery methods such as email, Slack, PagerDuty, or webhooks.
Real User Monitoring (RUM) A method of collecting data from actual users' browsers to measure how they experience the website's performance, as opposed to synthetic testing.
Time to First Byte (TTFB) The duration from the moment a user makes a HTTP request to the moment they receive the first byte of the page; utilized as a diagnostic metric for backend performance.
GraphQL Analytics API A flexible API provided by Cloudflare that allows users to query specific datasets—such as traffic or timing metrics—to build custom reports or dashboards.
Cache Hit Ratio The percentage of requests served directly from Cloudflare's edge network (cache) versus those that must be fetched from the origin server. A higher ratio generally means better performance and lower costs.
Monitoring website performance with Cloudflare involves using the Analytics dashboard to track high-level traffic, bandwidth, and errors, and leveraging Web Analytics to monitor real-user experiences like Core Web Vitals.
For advanced troubleshooting, you can use the GraphQL API to analyze Timing Insights and isolate whether latency originates from the network or the server.
Establishing Notifications ensures you are alerted to anomalies in real-time.
Good performance removes friction from ideas.