Why there is huge difference in Pageviews tracking number on discourse admin dahboard and on google analytics

Coming back to this again but comparing both GA4 and discourse page views to Google AdSense page views. I think there’s a profound issue with the Pageviews on Google AdSense compared to Google Analytics (GA4) and the Discourse stats, even using the official Ad Plugin.

As above GA4 seems to be counting the infinite scrolls as a new page view, which is correct in my opinion, On older software these would have made you use Pagination to get to the next set of posts which would require a full page load so loading the next set of posts is a dynamic or virtual pageview i think i saw it described as.

Discourse as explained above, is only counting when someone changes to a new page by changing thread or going to the homepage and creating a full new page load. This is fine, although I think the infinite scrolls are valid page views.

But Google AdSense is coming in with a far, far lower PageView total than even the Discourse total.

Take for example Saturday, July 15th, 2023

  • On GA4 I had 152,000 Page Views:
  • On Discourse I had 93,561 Page Views - the difference makes sense as outlined above:
  • On Google AdSense, using the official Plugin, I had 6,000 page views and made a whole €3.55

I realize AdSense page views are lower as they only count pages with Ads on them but I had ads in several positions on pretty much every page on the site and every 20 posts on threads, even allowing for Adblockers and crawlers or whatever that drop-off cannot be right … can it?

I think there are a couple of problems here, I suspect that Adsense, like Universal Analytics before it, is not counting the infinite scroll / virtual page views but I don’t think it’s even counting the page views that discourse is counting. Not even close.

Fathom Analytics Test

I ran an experiment using Fathom Analytics for a week using Tag Manager to add the code to my site, with it set to trigger on Page Views

Using the GTM debugger i noticed that you could browse several pages of the site and the tag could only ping once, i left it running like that for a week and the VIEWS were way down on GA4

With that setup Fathom had only 7.3K views
GA4 on the same date had 62K
Discourse Had:34K

I had disabled Adsense at that stage while running the tests but it seems like a very similar rate of fall-off.

I read up a bit on SPA and saw that adding the HISTORY Tigger might be suited to Discourse:

I added it and left it to run for a couple of weeks and you can see the jump:

August 15th got 37.5K views in Fathom, which tallies with my GA4 stats for that day:

There’s an interesting thread on it here:

After nearly three weeks of running display ads using the official Discourse ad plugin, we can confirm all our previous views based on SEO analysis of single page application (SPA) web sites.

Discourse is the worst performing web-site, from an ad revenue perspective, of any of the many web-sites we have managed over the years. Summary:

  • Google “sees” the initial page load as a “page view” but subsequent views after the initial page load of the SPA application is not “seen” as a “page view”.
1 Like