Mobile app version of vmapp.org
Login or Join
Yeniel560

: What types of clicks affect ''pages per session'' in GA? How can ensure click get registered to increase that? I have on my website a lot JS, e.g.: <a href="#" class="slideshow-button clicked">Slideshow</a>

@Yeniel560

Posted in: #Analytics #Google #Session

I have on my website a lot JS, e.g.:

<a href="#" class="slideshow-button clicked">Slideshow</a>

<a href="#" class="fullscreen-button clicked">Full Screen</a>

When user click on that this not affect "page per session" ?
if I edit the HTML and add in a href e.g. example.com/something will it then affect "page per session"?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Yeniel560

2 Comments

Sorted by latest first Latest Oldest Best

 

@Reiling115

If you want to track users doing actions on your site, without a pageload, Google Analytics provides events. You can send arbitrary events to Google Analytics and it will track them.
I once had a site that users would open and stay on one page for extended periods of time, and had an event polling every 2 minutes checking in that the user still had the page open.

10% popularity Vote Up Vote Down


 

@BetL925

Google Analytics counts page views whenever a page with the tracking snippet are loaded. Clicking links on those pages that trigger JavaScript but do not load another page would not increase the Google Analytics page view count.

You are correct that using full URLs (without a # in them) could help. When your hrefs are full URLs to other pages with the tracking snippet, GA would see additional page views and increase the "pages per session" metric.

Alternatively, you could have your JavaScript send extra page views programatically. Google has a guide for single page applications that shows how to send virtual page views with code like:

ga('set', 'page', '/slideshow');
ga('send', 'pageview');

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme