Cloudflare’s dashboard, your origin access log, and Google Analytics measure three different populations from three different vantage points, so they will never agree — and reconciling them to the last digit is wasted effort. Cloudflare counts every HTTP request that reaches the edge: bots, crawlers, blocked attacks, and cache hits included. Your server log counts only requests that got past the cache and the security layer to the origin. GA counts only human-ish browsers that executed its JavaScript and were not running a blocker. Each number is right about its own layer; the operational skill is knowing which one answers the question you are asking.
What’s happening
Requests fall away at each stage. Of everything arriving at the edge, security features drop some (those never reach you), the cache answers a large share (those never reach you either), and the remainder hits the origin — that is your access log. Of the pages that reach a browser, only those that execute the GA snippet report in — no bots, no blocker users, no bounced-before-load visits. The gaps between the three numbers are not errors; they are the cache hit ratio, the bot share, and the blocker share, in that order — each one a metric worth knowing on its own.
Two more wrinkles specific to Cloudflare. First, units: Cloudflare reports requests (every asset, every API call) and “unique visitors” approximated from IPs; GA reports sessions, users, and pageviews. A single pageview can be dozens of requests, so comparing the headline numbers is comparing kilometres to litres. Second, sampling: at higher traffic volumes, Cloudflare’s analytics pipeline stores and queries sampled data and scales the estimates back up — the GraphQL Analytics API exposes the sample interval on each node so you can see exactly how much estimation is in play. Small zones are mostly unsampled; large spikes are heavily sampled and can look slightly “smoothed” against your raw logs.
Plan limits, plainly: every plan including Free gets zone analytics in the dashboard and the GraphQL API’s aggregated datasets (request groups by hour/day, firewall event groups). Time resolution and how far back you can query grow with plan tier. What no plan below Enterprise gets is raw per-request log export from Cloudflare — that is Logpush/Logpull territory, and on Free/Pro/Business your only per-request record is your own origin log.
What to check first
- Which question is actually being asked: capacity (“how many requests must the stack absorb” — edge number), application behaviour (“what hit my code” — origin log), or marketing (“how many humans” — GA/RUM)?
- Whether the gap changed suddenly. Stable gaps are structure; a moving gap is an event — cache config change, bot wave, or GA tag broken.
- Whether Cloudflare’s number is lower than your origin log. That is the one impossible-looking case with a real meaning: traffic is reaching the origin without passing through Cloudflare.
How to verify
# Origin-side count for one day (compare with the dashboard's same-day total)
grep -c "03/Jul/2026" /var/log/nginx/access.log
# How much of the gap is cache? Log cf-cache-status upstream... or sample the edge:
curl -sI "https://example.com/" | grep -iE "cf-cache-status|cf-ray"
# Pull the edge's own count via GraphQL (aggregated groups, works on all plans)
curl -s "https://api.cloudflare.com/client/v4/graphql" \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Content-Type: application/json" \
--data '{"query":"{ viewer { zones(filter: {zoneTag: \"<ZONE_ID>\"}) { httpRequests1dGroups(limit: 1, filter: {date: \"2026-07-02\"}) { sum { requests cachedRequests } uniq { uniques } } } } }"}'
# Direct-to-origin leakage test: are there hits with no CF-RAY header logged?
awk '$0 !~ /CF-RAY/' /var/log/nginx/access.log | tail -20
That last check assumes you log the CF-RAY request header at the origin; lines without it (on a fully proxied site) are visitors or scanners bypassing Cloudflare.
The fix
There is nothing broken to repair — the fix is assigning each number a job and wiring your reporting accordingly:
- Capacity and attack questions → edge numbers. Total requests, cached vs uncached, threats blocked. This is the only layer that sees what the internet actually threw at you.
- Application debugging → origin logs. Unsampled, per-request, with status codes, timings, and your own request IDs. When a customer says “my upload failed at 14:02,” this is the record; Cloudflare’s aggregates cannot answer it on your plan.
- Human traffic → GA or a RUM tool, with known undercount. Accept the blocker-shaped hole (commonly a two-digit percentage) and use it for trends, not absolutes. The synthetic vs real-user monitoring comparison covers when RUM data is worth adding.
- Reconciliation, when someone insists → compare like with like. Filter the edge count to
cachedRequestssubtracted, content-type HTML, and it should land within shouting distance of your origin log’s page-ish requests. It will still not match exactly — sampling, in-flight config changes, and clock boundaries see to that. “Within 10-15%” is agreement. - Leakage → lock the origin down. If origin logs show more than the edge, find who is bypassing: scanners hitting the IP directly, an old DNS record, or a subdomain left grey-cloud. Firewall the origin to Cloudflare ranges and the numbers snap into order.
When this fix is wrong
If the request is “give me one true number,” push back on the request rather than torturing the layers into agreement — any single number is wrong for two of the three use cases. And if what is actually needed is per-request edge data (which asset, which colo, which bot score) on a Free/Pro/Business plan, the honest answer is that Cloudflare will not export it below Enterprise; design around origin logs plus well-scoped cache rules so the origin log covers everything that matters.
Common mistakes
- Comparing Cloudflare “requests” with GA “sessions.” Different units, different populations. The ratio between them is meaningless and it will drift every time you change caching.
- Panicking about “bot inflation” in edge numbers. A third or more of edge traffic being automated is normal internet weather, not an incident.
- Doing capacity planning from GA. GA missed the bots and the blockers — precisely the traffic your servers still had to serve.
- Forgetting that dashboard totals are estimates under sampling. For contractual or billing arguments, pull GraphQL data and note the sample intervals, or use your own logs.
Prevention
Write the three-layer mapping into your reporting docs once — which dashboard answers which question — and add the direct-to-origin leakage check to your quarterly review. Most “analytics discrepancy” tickets dissolve the moment the asker learns which population their number describes. If “is it Cloudflare or is it us” keeps eating your evenings, that triage is literally the job of 24/7 Monitoring & Response — book a monitoring and response review.