Layer Difference Causes Analytics Divergence | Generated by AI

Home 2026.06

Question: Why do GoatCounter and Cloudflare Web Analytics show significantly different results for the same website?

Answer:

They measure fundamentally different things at different layers of the stack. Here’s the breakdown:

Layer Difference — This Is the Core Reason

  GoatCounter Cloudflare Analytics
Layer Application (JavaScript) Network (CDN edge)
What it counts Page views from JS execution HTTP requests hitting Cloudflare
Runs on Browser Cloudflare’s edge nodes

Cloudflare sees every HTTP request — bots, crawlers, health checks, prefetches, asset fetches, API calls. GoatCounter only fires when a human browser executes JavaScript and the page actually loads.

Specific Reasons for Divergence

Cloudflare overcounts vs GoatCounter:

GoatCounter overcounts vs Cloudflare (rare but possible):

The Realistic Gap You’ll See

For a typical static site / GitHub Pages / Jekyll blog:

What Each Is Actually Good For

GoatCounter → true human page views, bounce rates, referrers from actual users. More accurate for “how many humans read this post.”

Cloudflare → bandwidth, attack detection, cache hit ratio, bot traffic volume, CDN performance. Good for infrastructure questions.

How to Make Them More Comparable

In Cloudflare, filter to:

Even then, Cloudflare will be higher because it still counts:

Quick Mental Model

Cloudflare count
= human page views
+ bot requests
+ asset requests (CSS/JS/img)
+ health checks
+ prefetches
+ JS-blocked users

GoatCounter count
= human page views where JS executed successfully
- users who blocked the tracker
- users with JS disabled

For your blog at lzwjava.github.io, the gap is likely dominated by Googlebot + other crawlers (since a technical blog gets indexed aggressively) and asset requests if Cloudflare is proxying everything including static files.


Back Donate