Web Analytics
Understand your visitors and Core Web Vitals — without cookies and without tracking people.
What is Web Analytics?
Web Analytics is Cloudflare's free, privacy-first way to see how people use your website — page views, visits, top pages, where visitors come from, and how fast your pages feel. It does all this without cookies and without collecting personal data, so it respects your visitors' privacy by design.
Think of it like a shop's people-counter
A people-counter at a shop door tells you how many came in and which aisles were busy — without asking anyone's name. Web Analytics counts visits and popular pages the same way: useful numbers, no personal tracking.
It works whether or not your site is proxied through Cloudflare. For sites not behind Cloudflare, you simply add a tiny piece of JavaScript called a beacon.
Why choose it over the usual analytics?
Many analytics tools rely on cookies and collect personal data, which can slow your site, trigger cookie-consent banners, and raise privacy concerns. Web Analytics takes a lighter, more respectful approach.
No cookies
Nothing is stored on the visitor's device, so you often don't need a cookie-consent banner just for analytics.
Privacy-first
It doesn't fingerprint users or collect personal data, making GDPR-style compliance much easier.
Lightweight
The beacon is tiny and loaded with 'defer', so it barely affects how fast your pages load.
Real performance data
It reports Core Web Vitals from actual visits, so you see how real users experience your speed.
What it measures
Page views & visits
Page views count how many pages were loaded; visits count browsing sessions that started on your site.
Top pages & referrers
See which pages are most popular and which sites or searches sent visitors to you.
Country, browser, device
Understand your audience by location, browser, and whether they're on mobile or desktop — all anonymized.
Core Web Vitals
LCP, INP, and CLS from real visits show whether your pages load fast, respond quickly, and stay stable.
How to add it to your site
Open Web Analytics
In the Cloudflare dashboard go to Analytics & Logs > Web Analytics, then select 'Add a site'.
Enter your hostname
Type your website's hostname (for example example.com) and confirm. Cloudflare generates a unique tracking token for it.
Copy the beacon snippet
From 'Manage site', copy the JS snippet. It contains a data-cf-beacon attribute holding your unique token, which tells Cloudflare which site the data belongs to.
Paste before the closing body tag
Add the snippet to your HTML pages just before </body>. Within a few minutes, data starts appearing in the dashboard.
<!-- Cloudflare Web Analytics -->
<script defer
src="https://static.cloudflareinsights.com/beacon.min.js"
data-cf-beacon='{"token": "YOUR_UNIQUE_TOKEN_HERE"}'></script>
<!-- End Cloudflare Web Analytics -->Already proxied through Cloudflare?
If your site is proxied (orange cloud), Cloudflare can enable Web Analytics automatically and inject the beacon for you — no manual editing needed.
When should you use it?
Privacy-sensitive sites
Ideal when you want useful stats without cookie banners or heavy compliance overhead.
Blogs & portfolios
Lightweight tracking of which posts and pages resonate, without slowing the site.
Performance tuning
Pair it with Speed to watch Core Web Vitals from real users improve after each change.
Tight budgets
It's free on every plan, so there's no cost barrier to understanding your traffic.
Tips & pricing
Mind ad blockers
Some ad or privacy blockers stop external analytics scripts, so your real numbers may be a little higher than reported. The trend over time still tells you what's working.
- Web Analytics is free on all Cloudflare plans.
- Use Filters to focus on one path, country, or referrer.
- Add the beacon to every page (or a shared template) so no traffic is missed.
- It needs no DNS change and no Cloudflare proxy — great for sites hosted anywhere.
Related products
menu_bookOfficial docsopen_in_new