Firing pageview events for perpetual scroll stories

Hi, I am using perpetual scroll/infinite scrolling feature into a website, after a user finished reading a story next story is loaded using lazy load / perpetual scroll feature and page url changes. But page view only fired once as page didn’t reload and we are losing this data. Please help, I am on js tracker version 2.17.

Hi @Pavas_Goswami ,

You will need to call the window.snowplow('trackPageView') function every time the story is changed.

There might be a callback in the framework that you are using for the scroll or you might be able to listen for changes in the URL using locationchange or hashchange listeners as described in this answer.

1 Like

I am loading tracker with the Snowplow tag , do i need to call this pageview track function explicitly?

Yes, that is correct, you will need to track page views explicitly with that call. You can read more here: Tracking Events | Snowplow Documentation