GA4 vs Cloudflare Web Analytics: The 2026 Head-to-Head

Two free tools, two completely different jobs. GA4 is a marketing and ecommerce measurement platform that happens to also count visitors. Cloudflare Web Analytics counts visitors and stops there. Here's every axis compared, honestly, with no invented numbers.

By Null Agency · Updated September 10, 2026 · Written for teams deciding between GA4 and Cloudflare Web Analytics

TL;DR — different tools for different jobs

GA4 sets the _ga cookie by default and needs consent in the EU/UK, ships custom events, audiences, funnels and a free BigQuery export, and is the only one of the two with Google Ads integration. Cloudflare Web Analytics is cookieless with no fingerprinting, free, and reports the basics — pageviews, top pages/referrers, countries, browsers, devices, Core Web Vitals — with no custom events, no UTM breakdown, and no CSV export button.

Skip to the row-by-row table below if you already know your use case, or read the sections in order for the reasoning behind each row.

Privacy model and consent

GA4 sets the _ga cookie by default, which is how it stitches a visitor's pageviews into a session and, longer-term, recognizes returning users. Because that's a persistent identifier, GA4 requires consent under GDPR and the UK's ePrivacy rules before it can legally fire for EU/UK visitors — which is the entire reason consent-banner tooling exists on so many sites. Our GA4 GDPR compliance breakdown covers what that actually requires in practice.

Cloudflare Web Analytics is cookieless with no fingerprinting. It doesn't set a cookie, doesn't build a cross-session identifier, and doesn't need consent under the same rules GA4 triggers. That's the single biggest reason teams reach for it: it removes an entire category of legal and engineering work, not just a line item in a privacy policy. If you're weighing whether you can drop the banner entirely, our cookie-banner guide walks through what else on a typical page still needs one.

Install

GA4 installs via gtag.js, which measures roughly 150 KB compressed on the wire (our measurement, 2026-09-10) — a single script tag, but a meaningfully heavier one than a purpose-built analytics beacon, and it typically comes with a tag-manager layer or consent-mode wiring on top for EU/UK compliance.

Cloudflare Web Analytics installs two ways. You can add its own small JS beacon to any site regardless of host, or, if your zone is already proxied through Cloudflare, it can be injected automatically with no code change at all. We won't put a number on the beacon's size here — Cloudflare doesn't publish one we can verify, so check their current docs if the exact payload matters to your setup.

Data depth: events, campaigns, and what each tool won't tell you

GA4 reports events, builds audiences, tracks multi-step funnels, and connects directly to Google Ads and ecommerce reporting — it's built to answer "which campaign drove this purchase," not just "how many people visited."

Cloudflare Web Analytics reports visits, pageviews, top pages, referrers, countries, browsers, devices/OS and Core Web Vitals. That's the full list. It answers "is traffic up or down and where is it coming from," and stops well short of anything marketing-attribution shaped.

GA4 supports custom events as a core feature — button clicks, form submits, scroll milestones, whatever you choose to fire, each with its own parameters. Cloudflare Web Analytics has no custom events at all. If tracking a specific interaction beyond pageviews matters to you, that's a hard line between the two tools; our guide on tracking custom events without GA4 covers the cookieless options that do support them.

GA4 handles UTM and campaign breakdown as a first-class feature — source, medium, campaign, term and content all flow into acquisition reports built for exactly this. Cloudflare Web Analytics has no UTM or campaign breakdown. It shows referrers, but it won't tell you which campaign inside a referrer drove a visit.

Vitals, export and retention

Both tools report Core Web Vitals, but not with the same amount of setup. GA4 does not ship a Core Web Vitals report in its base install the way Cloudflare Web Analytics does; teams typically send vitals into GA4 as custom events using Google's own web-vitals library. Cloudflare Web Analytics reports Core Web Vitals as part of the base product, no additional wiring required.

GA4 offers a free BigQuery export of raw event data — genuinely useful if you want to run your own SQL against the underlying events rather than trust the built-in reports. Cloudflare Web Analytics has no CSV export button in the dashboard; the data is reachable through Cloudflare's GraphQL Analytics API instead, which is a programmatic workflow rather than a one-click download.

GA4's standard property keeps user-level event data for 2 or 14 months, depending on how the property is configured (aggregate reports retain longer than the user-level data itself). GA4 explorations can also apply sampling or thresholding on larger data sets — worth knowing if you're pulling numbers for a report and the totals look softer than expected. Cloudflare Web Analytics has a limited history window — check Cloudflare's current docs for the exact retention period, since we won't put an unverified number on it here.

GA4 vs. Cloudflare Web Analytics, side by side

AxisGA4Cloudflare Web Analytics
Cookies / consent_ga cookie by default; needs consent in EU/UKCookieless, no fingerprinting; no consent trigger
Installgtag.js, ~150 KB compressedSmall JS beacon, or automatic on proxied zones
Custom eventsYes, core featureNo
UTM / campaign breakdownYesNo
Core Web VitalsNot in the base install; sent as custom eventsYes, out of the box
ExportFree BigQuery exportNo CSV button; GraphQL Analytics API
Retention2 or 14 months, user-level (standard property)Limited window — check current docs
CostFree; GA4 360 paid tier for enterpriseFree
Open sourceNoNo

Who should pick which

Pick GA4 if you run ads-driven ecommerce or any funnel where "which campaign led to this conversion" is a question you need answered. Custom events, audiences, Google Ads integration and campaign-level UTM reporting are GA4's real strengths, and nothing in this piece replaces them. The consent-banner overhead is the cost of that depth.

Pick Cloudflare Web Analytics if your site is already proxied through Cloudflare and you want honest, cookieless traffic numbers — visits, top pages, referrers, geography, vitals — with zero consent-banner work and zero setup beyond the toggle. It's the right tool when the question is "is traffic healthy," not "which campaign drove it."

The gap between those two is where a lot of teams get stuck: they want Cloudflare Web Analytics's no-consent simplicity but also need custom events or a UTM breakdown Cloudflare doesn't offer. That's the gap the next section covers.

On cost, the two are a wash at the entry level: both GA4 and Cloudflare Web Analytics are free to use. GA4 360, Google's paid enterprise tier, exists for large organizations — the pricing there is a sales conversation, not a published number, so we're not going to guess at one.

The third option: GhostMetrics

GhostMetrics — built by Null Agency, and we dogfood it on this site — keeps Cloudflare Web Analytics's cookieless, no-consent model and adds the pieces it's missing: custom events, UTM/campaign breakdown, and raw export on every plan, including free.

Privacy: no cookies, no localStorage, no IP addresses stored (hashed instead), no personal data, no cross-session identifier. Honors Global Privacy Control and Do Not Track by collecting nothing when either is present.

Install: one <script> tag in <head>, about 3 KB compressed on the wire (10 KB uncompressed), far lighter than GA4's gtag.js. No plugin, no tag manager, no build step, SPA-aware out of the box.

<script defer src="https://ghostmetrics.nullagency.io/gm.js" data-site="YOUR-SITE-ID"></script>

Custom events: add data-gm-event="signup-click" to any element and clicks are recorded automatically, or call window.ghostmetrics.track('name', { section: 'pricing' }) from code — the two things Cloudflare Web Analytics can't do at all.

UTM breakdown: gm.js reads utm_source, utm_medium and utm_campaign from the landing URL and attaches them to the session — first-touch within that session, held in sessionStorage, cleared when the tab closes. utm_term and utm_content aren't stored, and there's no cross-session attribution the way GA4's cookie-based model has. The dashboard shows a UTM Breakdown table (source/medium/campaign/visits) plus referrers and source types.

Export: every stored row, every column, as CSV from the dashboard's "Export data" button or JSON via the API — on the free plan too, no upgrade required.

Core Web Vitals: FCP, LCP, CLS and TTFB captured from real users, per-page, in the dashboard. INP is not captured — if interaction latency is a metric you report on, that's a real gap you should know about before you switch.

Plans: Free is free forever — one site, unlimited pageviews, real-time dashboard, full history, no card required. Pro is $9.99/mo flat, unlimited pageviews (no metering), unlimited websites under one login, and a public shareable dashboard URL — a 30-day free trial applies, card required to start it, nothing charged for 30 days, cancel anytime. That's the entire list of what Pro adds.

AxisGA4Cloudflare Web AnalyticsGhostMetrics
Cookies / consentCookie-based; needs consent EU/UKCookieless, no consent neededCookieless, no consent needed
Custom eventsYesNoYes (declarative + programmatic)
UTM breakdownYes, multi-sessionNoYes, first-touch within session only
Core Web VitalsNot in the base install; sent as custom eventsYes, out of the boxYes (FCP/LCP/CLS/TTFB) — no INP
Raw exportFree BigQuery exportNo CSV; GraphQL API onlyCSV or JSON, every plan including free
Audiences / cross-session funnelsYesNoNo (scroll-depth funnel only)
Ads integrationYes (Google Ads)NoNo
Open sourceNoNoNo
Free tierFree; multiple properties — check current limitsFree; multiple sites — check current limitsFree, 1 site (Pro $9.99/mo for more)

The honest limits: GhostMetrics doesn't capture INP, has no ads integration, no audiences, and no funnels across sessions — it isn't trying to be a GA4 replacement for ecommerce or ads teams. It's also not open source and the free plan caps at one site. If any of those is a hard requirement, GA4 or a self-hostable tool is the better fit; if what you want is Cloudflare Web Analytics's no-consent model with events, UTMs and export layered on, that's the gap GhostMetrics fills.

How to trial GhostMetrics alongside your current tool

  1. Keep your existing GA4 or Cloudflare Web Analytics install running. Don't remove anything yet — this is a parallel test, not a cutover.
  2. Add the GhostMetrics script tag to your site's <head> with your site ID. It's a single line, no build step.
  3. Open your own site in a fresh tab and confirm the visit appears in GhostMetrics's real-time dashboard.
  4. If you need custom events, add data-gm-event attributes to a few key elements — buttons, signup links, pricing CTAs — and click through to confirm they land in the Custom Events panel.
  5. Run both tools for a week and compare pageview and visitor totals. Small gaps between a cookieless tool and a cookie-based one are normal; large gaps are worth investigating before you rely on either number alone.
  6. Decide from there. If GA4's audiences, funnels or Ads integration are load-bearing for your team, keep GA4. If you just needed events, UTMs and export without the consent overhead, GhostMetrics can stand alone.

Want Cloudflare Web Analytics's no-consent model, with events and export? Try GhostMetrics

Cookieless, no consent$0 forever1 site free$9.99/mo flat Pro

GhostMetrics is cookieless web analytics — no cookies, no IP storage, honors GPC/DNT — installed with one script tag, about 3 KB compressed. The free plan is free forever: one site, unlimited pageviews, real-time dashboard, full history. Custom events, UTM breakdown, and raw CSV/JSON export are all included on free, not gated behind an upgrade.

Pro is $9.99/mo flat — unlimited pageviews, unlimited websites under one login, and a public shareable dashboard URL, with a 30-day free trial (card required to start, nothing charged for 30 days, cancel anytime). That's the full list of what Pro adds.

Start free — no cookies, no consent banner See the live demo

FAQ

Does Cloudflare Web Analytics track anything close to GA4's depth?
No, and it isn't trying to. Cloudflare Web Analytics reports visits, pageviews, top pages, referrers, countries, browsers, devices and Core Web Vitals — that's it. There are no custom events, no audiences, no funnels and no UTM/campaign breakdown. GA4 covers all of those. If you need campaign or ecommerce reporting, GA4 or a tool built for it is the right call.
Do I need a cookie consent banner if I switch to Cloudflare Web Analytics?
Cloudflare Web Analytics itself is cookieless with no fingerprinting, so it doesn't require consent under GDPR/ePrivacy on its own. GA4 sets the _ga cookie by default, which does require consent in the EU/UK. Switching your analytics tool alone doesn't remove a consent banner if other cookies (ads, embeds, chat widgets) are still present on the page.
Can I export raw data from Cloudflare Web Analytics like I can with GA4's BigQuery link?
Not the same way. GA4 offers a free BigQuery export of raw event data. Cloudflare Web Analytics has no CSV export button in the dashboard; the data is reachable programmatically through Cloudflare's GraphQL Analytics API instead, which is a different workflow than a one-click export.
Does GA4 report Core Web Vitals out of the box?
Not in the base install. Cloudflare Web Analytics reports Core Web Vitals out of the box; with GA4 the common approach is to send vitals in as custom events using Google's web-vitals library. GhostMetrics reports FCP, LCP, CLS and TTFB without that extra step — INP is not captured.
What does GhostMetrics add that Cloudflare Web Analytics doesn't?
Custom events, UTM/campaign breakdown, and raw CSV/JSON export on every plan, including free — none of which Cloudflare Web Analytics offers. GhostMetrics keeps the same no-consent, cookieless model. It doesn't do everything GA4 does either: no INP, no ads integration, no audiences, and no funnels across sessions.

Keep reading

Netlify Analytics Alternatives

Server-log analytics, and where it stops

Cloudflare Web Analytics Alternative

The deep dive on the tool compared here

UTM Parameters Guide

The five parameters, and cookieless attribution

GhostMetrics Live Demo

The real dashboard, live data

Disclosure: GhostMetrics is built by Null Agency and we use it on this site, so we're not a neutral party about our own product — we've kept the claims to what the free and paid plans actually do, and pointed to GA4 and Cloudflare Web Analytics where they genuinely fit better. Pricing and product details for third-party tools can change; always check the vendor's current docs before deciding.