I've been noticing something really perplexing while analyzing user data. Cloudflare analytics shows one number for users and traffic, but PostHog's numbers are about 70-80% lower for the same timeframe. This isn't just a minor difference; it feels like we're looking at entirely different realities here. I understand that Cloudflare operates at the edge/network level while PostHog is based on event tracking, but such a huge gap is hard to trust when making decisions. I've already checked for possible issues like ad blockers potentially affecting PostHog, bots being counted by Cloudflare, and whether events are firing consistently. Despite these checks, the discrepancy still seems excessive. Has anyone else experienced this? What are the usual causes, and how did you resolve or debug the situation? I'm aiming for at least some reliability in these numbers.
4 Answers
This is often a classic example of attribution gap. Cloudflare's edge-level tracking versus PostHog's client-side events can lead to discrepancies due to factors like ad blockers or timing issues with scripts loading. It can get tricky to reconcile these numbers.
Cloudflare includes all requests—bots included—and doesn’t filter out repeat visitors. That’s likely why their numbers are higher. You may want to consider how you set up tracking to mitigate this issue.
It's not uncommon to see gaps like this. PostHog can get blocked by many ad blockers and privacy tools, whereas Cloudflare captures everything at the DNS level. So, that could explain a big part of the difference you’re observing.
In our experience, PostHog tends to be more accurate, especially with event-based setups. Cloudflare might not track repeat visitors as effectively, which PostHog does. However, if you’re seeing over a 70% drift, that's pretty concerning. It might be worth investigating further.

Related Questions
How to Build a Custom GPT Journalist That Posts Directly to WordPress
Cloudflare Origin SSL Certificate Setup Guide
How To Effectively Monetize A Site With Ads