Question

View time spent on a particular page

  • 19 December 2022
  • 5 replies
  • 219 views

Userlevel 2

Is it possible to view the time a user has spent on a particular page?


5 replies

Badge

Hi @Simarpreet Singh,

Thanks for reaching out to us. Yes, we can calculate the time spent on a particular page of your application, this can be achieved by making use of some Javascript utilities as documented here: https://support.gainsight.com/PX/API_for_Developers/JavaScript_Utilities

Regards,

Srinivas.

Userlevel 4
Badge

@srinivas myakala is this javscript required to be added to the application or to the gainsight px engagement?

Badge

Hi @JPKelliher ,

The javascript code mentioned in the document, has to be added on your application. The time spent on the app will be computed on the app page and then a custom event will be pushed to PX after the stipulated time mentioned in the respective function of the code. 

Userlevel 4
Badge

@srinivas myakala Thank you. As I read through the script (I am not a developer) I am wondering if this is a custom event that is simply set up once and repeated fires (say every five seconds)?

Example: Custom Event Name (timeOnPage) and we see this event occur every five seconds in the user Activities page. 

 

 

Or do we need to create multiple custom events for each time frame?

Example: Custom Event Name (fiveSeconds). A second Custom Event Name (tenSeconds). A Customer Event Name (thirtySeconds).

Userlevel 2

Hi @srinivas myakala, I ended up missing your reply but we’d still like to implement this now. I’d like to ask a few questions as I’m still unclear about how we’d set this up.

Our goal: Having the ability to view time spent on each page just like we can see the average session duration of users. However, I’d like to drill down and see user/account wise time spent instead of a global level that we can do in the dashboard. So it could ideally be a new event in query builder that we could use. 

Is this doable via the JavaScript utilities you mentioned? If not, what would be the next best implementation we could do? I don’t want to push a custom event with a stipulated time but to record an event with however much time is actually spent on a page by the user/account.

Reply