Is Cloudflare Web Analytics data sampled, and how long is it kept?
Cloudflare Web Analytics keeps six months of data, and only the last 7 days of it unsampled. After a week, Cloudflare aggregates the data down to about 10% of its volume for long-term storage. invisit stores every event, unsampled, and keeps it forever on every plan.
As of November 2026, Cloudflare’s FAQ says the beacon fires on every page view and the ingestion pipeline records every beacon it receives. Sampling comes after: when you open the dashboard or query the GraphQL API, Cloudflare picks a sampling level between 0.0001% and 100% based on your filters and the number of matching rows, and the API’s sampleInterval field tells you which one it used. Cloudflare calls this Adaptive Bit Rate: it trades exact counts for fast answers. Low-traffic sites are sampled at higher rates to keep the totals reliable.
For the headline numbers on a busy site, that works well. It matters when you filter down to a small slice, such as one page from one country last quarter, and when you want to compare this month with the same month last year: Cloudflare’s six-month window has no last year.
Can Cloudflare Web Analytics track custom events or campaigns?
No. As of November 2026, Cloudflare answers “not yet” to both custom events and UTM parameters: it logs no query strings, to avoid collecting sensitive data. invisit tracks custom events with up to 32 properties, conversions and funnels, and reports campaigns and UTM source and medium on every plan, its free plan included.
What Cloudflare reports is set by its high-level metrics and dimensions: visits, page views, page load time and Core Web Vitals, broken down by country, host, path, referrer, device type, browser and operating system, with a switch to exclude bots. A visit is a page view whose referrer is another site. There is no unique-visitor count among those metrics, and no sign-ups, purchases or button clicks.
With invisit you send events from code or from HTML attributes (events), build funnels from pages or events, and see each visit’s pages and events in order, at any age (visits). Revenue comes straight from Stripe, Paddle and other providers, and Google Search Console queries sit beside your traffic on every plan.
Proxied or not: how Cloudflare Web Analytics collects data
Cloudflare Web Analytics works on any site, but it works best on sites proxied through Cloudflare. There, one click injects the beacon, data reports to your own domain, and there is no site limit. Elsewhere you paste a snippet, and an account tracks up to 10 such sites unless support raises the limit. invisit works the same on any host.
From Cloudflare’s setup guide and limits, as of November 2026:
| Sites outside Cloudflare | Sites proxied through Cloudflare | invisit | |
|---|---|---|---|
| Setup | Paste the snippet | Automatic injection, on by default | Script tag or @invisitdev/web |
| Data sent to | cloudflareinsights.com |
Your own domain, /cdn-cgi/rum |
api.invisit.dev, or your own domain |
| Sites | 10, a soft limit | No limit | 4 free, unlimited on paid plans |
| Path rules | No | 0 on Free, 5 on Pro, 20 on Business, 100 on Enterprise | excludePaths, on every plan |
| EU visitors | No EU setting documented | Left out by default on the Free plan | Counted |
The script itself always loads from static.cloudflareinsights.com, and Cloudflare’s FAQ notes that ad blockers such as Adblock Plus, Brave and the DuckDuckGo extension block it. For proxied sites, Cloudflare’s answer is edge analytics: the Analytics tab counts every request Cloudflare serves, with no script at all, and Pro, Business and Enterprise plans break that traffic down by URL. invisit has no script-free mode, but @invisitdev/server serves the tracker and its data from your own domain.
Core Web Vitals and script size: Cloudflare vs invisit
Both record Core Web Vitals from real visitors at no extra cost, and Cloudflare goes deeper on debugging. Its Core Web Vitals view splits LCP into four phases and INP into three, and lists the five page elements that hurt each vital most, by CSS selector, with P50 to P99 values. invisit records LCP, INP, CLS, FCP and TTFB by page, device, country and browser, and never bills them.
Cloudflare’s beacon.min.js (version 2026.10.1) measured 10,253 bytes with gzip -9, about 10.3 KB, and Cloudflare served it as 10,264 bytes of gzip (our script size test). invisit’s core script is about 9.8 KB, and its web vitals module loads separately at 1.1 KB, so with vitals on, an invisit visitor downloads about 11 KB: slightly more than Cloudflare’s single file. Either way the difference is a few milliseconds on a slow connection.
Cloudflare’s beacon does one job, performance. invisit’s core script also records custom events, outbound link and download clicks, and events from HTML attributes. Heatmaps (1.5 KB) and the feedback widget are separate modules that load only when you turn them on.
Does Cloudflare Web Analytics use cookies, and where is the data stored?
Cloudflare Web Analytics sets no cookies and uses no localStorage, and Cloudflare says it does not fingerprint visitors by IP address or User-Agent (product page). invisit sets no cookies either, and tells visitors apart with a hash that rotates every day (privacy).
Where the data lives is less clear on Cloudflare’s side. Its RUM beacon docs say beacon data is processed at the nearest Cloudflare data center, and the Data Localization Suite compatibility table marks Web Analytics as not compatible with Customer Metadata Boundary, the feature that keeps analytics and logs in the EU. Cloudflare’s alternative is to leave EU and EEA visitors out of RUM, which is the default for free proxied sites.
invisit stores analytics data in Falkenstein, Germany, and counts EU visitors like any others. It sits behind Cloudflare itself for DNS and CDN, so Cloudflare, a US company, handles invisit’s traffic in transit. invisit offers a DPA, can honour Global Privacy Control and Do Not Track, and has an optional consent mode.
When Cloudflare Web Analytics is the better choice
If you want to know how many people read which pages, from which sites and countries, and your budget is zero at any volume, Cloudflare Web Analytics is hard to beat. It is free on every Cloudflare plan with no usage pricing, while invisit’s free plan stops at 20,000 events a month.
If your site is already proxied through Cloudflare, setup is one click, and the edge analytics in the Analytics tab count every request with no script to block. invisit always needs its script for visitor analytics.
For performance work, Cloudflare’s sub-parts and element-level debug view tell you which image or handler slowed a page. AI Crawl Control shows which AI crawlers read a proxied site, on every plan with no code, though the free plan shows only the last 24 hours of metrics. invisit records search and AI crawler reads too, kept like everything else, but needs @invisitdev/server or a Cloudflare Worker in front of your site.
Switching from Cloudflare Web Analytics to invisit
- Create a site in invisit and add its script tag next to Cloudflare’s beacon (installation). Run both for a few weeks so you can compare the numbers. Expect invisit to count more on free proxied sites, where Cloudflare leaves EU visitors out.
<!-- Before: Cloudflare Web Analytics, manual setup -->
<script
type="module"
src="https://static.cloudflareinsights.com/beacon.min.js"
data-cf-beacon='{"token": "<site token>"}'
></script>
<!-- After: invisit -->
<script
async
src="https://api.invisit.dev/invisit.js"
data-site="<site id>"
data-collector="https://api.invisit.dev"
></script>- If your site is proxied through Cloudflare, put the invisit Worker in front of it. It serves the tracker from your own domain and records crawler reads, without touching the site itself, and a deploy button sets it up from a template.
- Add the events Cloudflare could not record:
track('signup', { plan: 'pro' })from@invisitdev/web, ordata-invisit-eventattributes with no JavaScript (events). Then connect your payment provider and Google Search Console. - Save your history. invisit cannot import it, and Cloudflare has no CSV export in its Web Analytics docs; the GraphQL Analytics API returns the same aggregates as the dashboard, within the six-month window and sampled as described above.
- Remove the beacon. On a proxied site, open the site’s Manage site page in Web Analytics and choose Disable.