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.
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.
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.
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.
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.
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.
| Axis | GA4 | Cloudflare Web Analytics |
|---|---|---|
| Cookies / consent | _ga cookie by default; needs consent in EU/UK | Cookieless, no fingerprinting; no consent trigger |
| Install | gtag.js, ~150 KB compressed | Small JS beacon, or automatic on proxied zones |
| Custom events | Yes, core feature | No |
| UTM / campaign breakdown | Yes | No |
| Core Web Vitals | Not in the base install; sent as custom events | Yes, out of the box |
| Export | Free BigQuery export | No CSV button; GraphQL Analytics API |
| Retention | 2 or 14 months, user-level (standard property) | Limited window — check current docs |
| Cost | Free; GA4 360 paid tier for enterprise | Free |
| Open source | No | No |
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.
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.
| Axis | GA4 | Cloudflare Web Analytics | GhostMetrics |
|---|---|---|---|
| Cookies / consent | Cookie-based; needs consent EU/UK | Cookieless, no consent needed | Cookieless, no consent needed |
| Custom events | Yes | No | Yes (declarative + programmatic) |
| UTM breakdown | Yes, multi-session | No | Yes, first-touch within session only |
| Core Web Vitals | Not in the base install; sent as custom events | Yes, out of the box | Yes (FCP/LCP/CLS/TTFB) — no INP |
| Raw export | Free BigQuery export | No CSV; GraphQL API only | CSV or JSON, every plan including free |
| Audiences / cross-session funnels | Yes | No | No (scroll-depth funnel only) |
| Ads integration | Yes (Google Ads) | No | No |
| Open source | No | No | No |
| Free tier | Free; multiple properties — check current limits | Free; multiple sites — check current limits | Free, 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.
<head> with your site ID. It's a single line, no build step.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.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 demoDisclosure: 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.