Tracking Pageviews in Analytics using page visibility (by Philip Walton)
I came across an interesting alternative approach from Philip Walton. He explains clearly why all websites cannot work with the default definition of a page view in Analytics and how we someone could start using the page’s visibility state (using the Page visibility API).
Unfortunately this post was originally published in 2017 and still until today, even though Single Page Application (SPA) websites are widely used, we reply mostly on complicated implementations to virtually create page views for analytics tracking.
Another alternative to this problem is to use an Event Driven Data Layer (EDDL), but I like the simplicity of this approach as it can be implemented once and then applied everywhere, regardless of the website’s architecture. It is also able to capture more accurately content consumption by website visitors!