How to find average time spent on specific webpage using nrql?

I want to find the average time spent on a specific url page. I currently know how to find the total session length, however, I do not know how to determine the aggregate of total session lengths for a specific page, and further take the average of that total session length.

Hi @Gwiggins - The post below from the NRQL Library may help you.

Thanks for referring me to this post. I have tried doing a similar query to this before and like the one in the post tagged, I struggled to take the average of all of the sessions. Do you have any idea on how I’d be able to get the average of all of the facet’d sessions so I get one number?

Hi, @Gwiggins: Try this:

SELECT average(`Session Length`) 
  (SELECT ((max(timestamp) - min(timestamp)) / 1000 / 60) AS 'Session Length' 
   FROM PageView 
   FACET session) 
1 Like