How to register a Google Analytics page view after scrolling past X posts?

I’m currently evaluating Discourse for replacing the existing forum of an established website. We use Google Analytics across the site and the current forum and would prefer to continue using that. However, one concern is with regards to tracking page views in GA. Given that Discourse uses infinite scrolling, I’m wondering whether Discourse registers a page view in GA automatically or that’s something that would need some dev work. If it would need dev work, would it be straightforward to implement? By straightforward, I don’t mean easy - I mean in a manner that doesn’t involve hacks or going against the general design/dev principles of Discourse.

This is an important issue because a lot of ad partners use GA and if we can’t accurately represent the number of page views in GA, it becomes a problem.

I would love to get any kind of feedback on this.


1 Like

Well yeah, there’s a site setting where you plug in your GA key and it takes care of everything automatically. This has been in place for 5+ years.


That’s great to know! Thank you so much!


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.