Help. It is necessary to find out how many pages the user has viewed in one session and the time spent on these pages (except for the last).
The question with time is clear, you need to get the difference between the time of the first entry on the page and the last.
I do not really understand how to determine that the transition to another page has been made.