Mobile app version of vmapp.org
Login or Join
Barnes591

: Infinite scrolling without losing "Page Views" in Google Analytics Let's say "Page Views" is a very important metric on your website (KPI) but you want to introduce the nice looking infinity

@Barnes591

Posted in: #GoogleAnalytics #InfiniteScroll

Let's say "Page Views" is a very important metric on your website (KPI) but you want to introduce the nice looking infinity scrolling on certain heavily used pages.

What are the possibilities in order to introduce infinite scroll without losing page views, e.g. is there a legal way of resubmitting a page view to Google Analytics?

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Barnes591

3 Comments

Sorted by latest first Latest Oldest Best

 

@Gail5422790

Easier way to do it, would be setting up a Tag that fires when the URL changes from /page-1 to /p2...n
This way it will capture the pageview when the url changes while scrolling.
However, if the URL is static (which I highly doubt), you can use the above mentioned JS methods.

10% popularity Vote Up Vote Down


 

@Heady270

If you use jquery infinitescroll plugin to do paging, just try as below:

$('.selector').infinitescroll({
// other options
dataType: 'json',
appendCallback: false,
nextSelector: '.page-nav:last a',
}, function(json, opts) {
ga('send', 'pageview', $('.page-nav:last a').attr('href'));
// Do something with JSON data, create DOM elements, etc ..
});

10% popularity Vote Up Vote Down


 

@Shelley277

Yes, you can create virtual pageviews in Google Analytics. When the user goes over a certain point in the page, a pageview is recorded.

You can find information on how to set up virtual pageviews here:
developers.google.com/analytics/devguides/collection/gajs/asyncMigrationExamples#VirtualPageviews
This should be done with JavaScript. jQuery Waypoints is a good library to help:
imakewebthings.com/jquery-waypoints/
You should select the virtual URL to put in the code carefully. For example you can set them as subpages of the main page.

_gaq.push(['_trackPageview', '/example-page/point-1']);

_gaq.push(['_trackPageview', '/example-page/point-2']);

_gaq.push(['_trackPageview', '/example-page/point-3']);

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme