Users are discussing a significant discrepancy between page view counts in Discourse and Google Analytics (GA). BCHK notes a 10x difference, with Discourse showing higher totals. riking explains that Discourse limits views to one per user/IP per day, while GA may count multiple views per user and uses different detection methods. ClawdiaWolf adds that IPv6 connectivity issues can affect GA’s ability to identify unique users, leading to inflated counts. lucy.sierracircuits reports the opposite issue—GA showing fewer views than Discourse. sam clarifies that Discourse counts server-side page views, while GA relies on client-side JavaScript, which fails to track views from non-JavaScript browsers, crawlers, or those with tracking blocked, explaining the variance.
Now I know these stats are not apples to apples comparisons - the first one is “all the clicks ever for that page”, I believe. While the second are the past week’s results.
But still - shouldn’t they be in the same ballpark (or if anything, the weekly should be less than the Discourse “total views” number?
That number in Discourse is capped to counting 1 view per (user OR ip) per day. Google Analytics may be counting multiple views per person, and also have better methods of detecting whether two visitors from the same IP are the same user.
This, and another factor can be whether a user’s connection is IPv6 enabled and working.
Situation where I saw something like this before was an instance where the admin didn’t include his server’s v6 address in DNS, so users were accessing Discourse on their v4 public IP, but Google Analytics was seeing them on their device’s v6 address so it was actually less capable of suppressing multiple views from the same user.
EDIT: ack! Just saw how old this post was. Not sure why it popped up in my new list O_o
This is normal, we count page views on the server. GA counts it as a reaction to the JavaScript running on the client. There are many types of pageviews that GA can not count.