Privacy-First Web Analytics: Real User Monitoring, Core Web Vitals, and Navigation Measurement
How client-side Real User Monitoring works, what the beacon collects, Core Web Vitals diagnostics, SPA navigation types, setup, limits, and troubleshooting.
This page summarizes Cloudflare Web Analytics documentation on Real User Monitoring (RUM): a privacy-first, JavaScript-based way to measure how visitors experience page load speed, Core Web Vitals, and navigation patterns—without cookies and, for proxied sites, often without manual snippet installation.
Cloudflare Web Analytics provides free, privacy-first analytics for your website without changing your DNS or using Cloudflare’s proxy. Cloudflare Web Analytics helps you understand the performance of your web pages as experienced by your site visitors.
— Cloudflare, About
The data shown in Web Analytics is real user monitoring. Metrics come from a lightweight beacon (beacon.min.js) that uses browser Performance APIs and Google’s open-source web-vitals module—not from sampling visitors or storing personal data in the browser.
Real User Monitoring (RUM): what it measures and what it is not
Section titled “Real User Monitoring (RUM): what it measures and what it is not”Real User Monitoring in Web Analytics captures performance from actual browser sessions: page views, visits, page load time, and Core Web Vitals (Largest Contentful Paint (LCP), Interaction to Next Paint (INP), Cumulative Layout Shift (CLS)). That complements synthetic lab tests because users differ by network, device, browser, and extensions.
Understanding how real visitors experience your site requires metrics from actual sessions, not synthetic tests. Cloudflare Web Analytics collects Core Web Vitals and performance data from 100% of page views without cookies or sampling.
— Cloudflare, Monitor performance
Web Analytics is client-side only. It does not replace edge HTTP analytics (traffic by URL from server logs). Proxied customers on paid plans can use advanced HTTP traffic analytics for server-side URL breakdowns; Web Analytics stays on in-browser measurement.
| Concern | Web Analytics (RUM) | Edge / HTTP analytics |
|---|---|---|
| Data source | JavaScript beacon in the browser | Requests at the Cloudflare edge |
| Core Web Vitals, paint timings | Yes | No |
| Blocked by ad blockers | Often yes | No (for proxied traffic) |
Cookies or localStorage for metrics |
No | N/A |
High-level definitions from Cloudflare:
- Visits — A page view that originated from a different website or direct link (referrer does not match hostname); one visit can include multiple page views.
- Page views — A successful HTTP response with a content-type of HTML.
- Page load time — Total time to load the page (not necessarily the sum of every timing row shown in the UI).
See High-level metrics.
Privacy and EU visitor exclusion
Section titled “Privacy and EU visitor exclusion”The beacon does not use cookies, localStorage, or fingerprinting via IP or User-Agent for usage metrics.
Web Analytics uses its lightweight JavaScript beacon to collect the information Vitals Explorer uses. It does not use any client-side state, such as cookies or localStorage, to collect usage metrics. Vitals Explorer also does not fingerprint individuals via their IP address, User Agent string, or any other data.
— Cloudflare, Core Web Vitals
You can enable RUM while excluding EU/EEA visitors so metrics collected via EU data centers are dropped—intended to help with GDPR and CCPA choices. Configure this under Manage Site for a hostname in Web Analytics. Free accounts may have RUM enabled by default with EU traffic excluded (RUM beacon).
RUM beacon (beacon.min.js): how data is collected and sent
Section titled “RUM beacon (beacon.min.js): how data is collected and sent”Where the script loads and where metrics go
Section titled “Where the script loads and where metrics go”The performance beacon loads from https://static.cloudflareinsights.com/beacon.min.js (allow this host in Content Security Policy if you use CSP).
Beacon payloads are sent to:
https://<yourdomainname>/cdn-cgi/rumfor sites proxied through Cloudflare, orhttps://cloudflareinsights.com/cdn-cgi/rumfor sites not proxied (manual embed).
Core Web Vital metrics are reported when visibilityState is hidden for the first time after the page load event (Data origin and collection).
Collection uses performance.getEntriesByType('navigation') when available, with a fallback to performance.timing.
When the beacon sends data (MPAs vs SPAs)
Section titled “When the beacon sends data (MPAs vs SPAs)”For traditional multi-page sites, the beacon reports on load and when the user leaves the page. For SPAs, additional metrics are sent on route changes (Web Analytics FAQ).
/cdn-cgi/rum: POST-only ingestion endpoint
Section titled “/cdn-cgi/rum: POST-only ingestion endpoint”The ingestion endpoint accepts POST for metric submission; OPTIONS supports CORS preflight.
The /cdn-cgi/rum endpoint only accepts POST requests for data ingestion. If you send a request using any other HTTP method (for example, GET, PUT, or DELETE), the endpoint returns a 405 Method Not Allowed response with an Allow: POST, OPTIONS header (OPTIONS is allowed for CORS support).
— Cloudflare, Web Analytics FAQ
Non-POST requests now return 405 (with Allow: POST, OPTIONS) instead of 404, so logs clearly show the route exists but rejects the method (changelog). Normal operation is unaffected because beacon.min.js already uses POST. 405s in logs usually come from scanners or tools issuing GET—not from the official beacon. Cloudflare does not support custom integrations that POST directly to this endpoint; traffic should originate from their beacon JavaScript (FAQ).
The script is injected as type="module" so legacy browsers such as Internet Explorer do not load it (beacon changelog, FAQ).
Enable Web Analytics: proxied sites, manual snippet, and Pages
Section titled “Enable Web Analytics: proxied sites, manual snippet, and Pages”Sites not proxied through Cloudflare
Section titled “Sites not proxied through Cloudflare”- In the dashboard, open Web Analytics and Add a site.
- Set the hostname and copy the JS snippet from Manage site.
- Paste the snippet before the closing
</body>on each HTML page you want measured.
Non-proxied tracking is limited to 10 sites per account (Limits).
Sites proxied through Cloudflare (automatic injection)
Section titled “Sites proxied through Cloudflare (automatic injection)”Proxied zones can use automatic setup (default): Cloudflare injects the snippet as HTML passes through the edge—no DNS change required for Web Analytics itself.
Manage Site options include: full enable, enable excluding EU visitor data, manual JS snippet, or disable (Get started).
Rules (proxied only) control which hostnames/paths get the snippet; a default rule usually covers the whole zone (Rules). Configuration rules can set disable_rum: true and override Web Analytics rules (Configuration Rules settings).
Cloudflare Pages one-click enable
Section titled “Cloudflare Pages one-click enable”In Workers & Pages, select the project → Metrics → Enable under Web Analytics; the snippet is added on the next deployment (Pages how-to).
Tag managers and SPA disable option
Section titled “Tag managers and SPA disable option”For Google Tag Manager, use the query-string token form:
<script type="module" src="https://static.cloudflareinsights.com/beacon.min.js?token=$SITE_TOKEN"></script>(FAQ)
To turn off SPA route tracking with manual embed, set "spa": false in data-cf-beacon (Web Analytics for SPAs).
Core Web Vitals in the dashboard: metrics and LCP/INP sub-parts
Section titled “Core Web Vitals in the dashboard: metrics and LCP/INP sub-parts”Open Web Analytics → your site → Core Web Vitals (access steps).
| Metric | What it reflects |
|---|---|
| LCP | Perceived load speed of main content |
| INP | Responsiveness to clicks, taps, keys |
| CLS | Visual stability (Chromium browsers for Layout Instability API today) |
The Core Web Vitals tell you whether a page is slow but beyond perceived load time, layout instability, or responsiveness they do not guide you to the problematic area directly. To help you with this, Real User Monitoring (RUM) in Web Analytics now breaks Largest Contentful Paint (LCP) and Interaction to Next Paint (INP) into their respective sub-parts. It also splits connection time into TCP and TLS.
— Cloudflare, Deeper Core Web Vitals Diagnostics
In Page Load, connection time is split into connection time excluding TLS (connectionTimeWithoutTLS) and TLS handshake (tlsTime). The GraphQL Analytics API keeps combined connectionTime for backward compatibility (same changelog).
Filter Core Web Vitals by URL, browser, OS, country, element, and other dimensions via Filters.
Navigation Type: hard loads, soft navigations, and cache behavior
Section titled “Navigation Type: hard loads, soft navigations, and cache behavior”Web Analytics reports Navigation Type so you can see whether users arrived via link navigation, reload, back/forward, cache hits, prefetch, or prerender (changelog).
Understanding navigation types is critical for optimizing user experience. For example, if a high volume of your traffic consists of “Back-forward” navigations versus “Back-forward Cache”, those visitors are not benefiting from the Back/Forward Cache (bfcache) and therefore are experiencing higher load times due to potentially unnecessary network requests.
— Cloudflare, Navigation Type filtering
In the dashboard: Page views → scroll to navigation types, or add a Navigation type filter (equals, in, etc.) (same doc).
Google’s public CrUX documentation describes analogous navigation-type labels (navigate_cache, back_forward_cache, reload, and others) for field data context (Chrome navigation types).
SPA soft navigation and navigationType values
Section titled “SPA soft navigation and navigationType values”SPAs (React, Vue, Angular, Svelte, etc.) mostly use soft navigations that do not fully reload the document. Non-SPA sites can still emit soft navigations if they use the Navigation API or History API (SPA improvements changelog).
Cloudflare segments navigationType as:
navigationType |
Meaning |
|---|---|
navigate |
Hard navigations (traditional full document loads) |
soft-navigation |
Client-side navigations where Chrome’s Soft Navigation API is available; LCP on soft navigations is measured here |
routing-apis |
Fallback via Navigation API or History API when Soft Navigation API is unavailable (e.g. Safari, Firefox); other Core Web Vitals present, LCP not collected |
Improvements shipped in the beacon (via updated web-vitals and Soft Navigation API support) can change reported pageviews, visits, and LCP compared with earlier periods—magnitude depends on your front-end architecture (changelog, beacon changelog 2026-08-20).
Cloudflare tracks SPAs by Soft Navigation API, Navigation API navigate events, or History pushState / popstate patching (Web Analytics for SPAs).
Why numbers differ from Google Analytics or edge analytics
Section titled “Why numbers differ from Google Analytics or edge analytics”Misalignment with Google Analytics, server logs, or search analytics is expected.
It is possible that your Cloudflare metrics do not fully align with data for the same site as reported by other analytics sources, such as Google Analytics and web server logs.
— Cloudflare, About Cloudflare Analytics FAQ
JavaScript analytics miss bots, many automated clients, users with JavaScript disabled, and users who leave before the snippet runs. Cloudflare’s IP-based visit counting for some edge analytics can count higher visitors than GA. Partial fetches (APIs, plugins) may count as visitors in Cloudflare but not as full pageviews elsewhere.
Using Cloudflare’s proxy does not break Google Analytics when GA is installed as Google recommends—the GA tag runs in the browser and does not send hits through your origin (Cloudflare and Google Analytics).
Missing Web Analytics data may be due to: 24-hour delay on free plans for new domains, nameserver propagation (24–72 hours), hosting-partner CNAME setup (traffic on bare domain.com vs www), or ad blockers blocking cloudflareinsights.com / the beacon (About missing metrics, FAQ).
Web Analytics does not log UTM query strings today (privacy); referer dimension covers external referrers (FAQ).
Account limits, dashboards, and common mistakes
Section titled “Account limits, dashboards, and common mistakes”| Topic | Limit or behavior |
|---|---|
| Non-proxied sites tracked | 10 per account (Limits) |
| Account-wide aggregate view | Optimized for up to 1,000 sites; above 1,000 you must filter sites or use GraphQL (dashboard reliability) |
| Only one beacon snippet | Multiple snippets on one page are not supported (FAQ) |
Common mistakes
- Hostname mismatch — CORS errors when the page hostname does not match the Web Analytics site config; postfix matching allows subdomains of the configured site but not unrelated domains like
example.com.br(FAQ). - Missing
Referer/Origin— Required for allowed reporting; do not rely onReferrer-Policyalone to replaceReferer(FAQ). - Assuming automatic setup on proxied zones — Manual snippet still valid; it reports to
cloudflareinsights.cominstead of same-origin/cdn-cgi/rum(FAQ). - Interpreting Zone Overview cache ratio jumps — A separate fix made Zone Overview cached/uncached counts more accurate (excludes non-cache 403s, etc.); historical rollups are not rewritten (cached classification). That is edge analytics, not the Web Analytics beacon.
Observatory can enable RUM from a test result; that creates a Web Analytics site entry. Disable via Web Analytics → Manage Site → Delete (Observatory FAQ). Observatory RUM maps may lag, use progressive sampling, and lose data when the beacon is blocked (same FAQ).
How to check this on your site
Section titled “How to check this on your site”- Confirm the site appears under Web Analytics with the correct hostname and enablement mode (automatic, manual, or EU exclusion).
- In browser devtools Network, load a page and verify
beacon.min.jsloads fromstatic.cloudflareinsights.comand a POST to/cdn-cgi/rum(proxied) orcloudflareinsights.com/cdn-cgi/rum(manual non-proxied) succeeds—not GET returning 405. - Open Core Web Vitals for the site and review LCP, INP, CLS; expand Page Load for TCP/TLS sub-parts after traffic exists.
- On Page views, review Navigation type distribution and filter outliers (high
reloadorback_forwardwithout cache) using Filters. - You can check automatically in Answerwell (our tool): https://answerwell.org/workspace
Report an error or ask a question
Section titled “Report an error or ask a question”If something on this page is wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact sentence you are asking about so it can be corrected or explained.