I noted that whereas the average visit duration for some pages on the website I use Matomo for is 1-2 minutes, there are some visit durations at around 30 minutes (close to the standard length).
Could this be because users open the page in a new tab, but are not active on this tab? How exactly does Matomo determine whether a user becomes and remains active or how a session becomes and remains alive? For example, does Matomo register scrolling or moving the mouse and base it on this? And can Matomo register when a user closes a tab/window/the browser and ends the session?
I only recently found out that it is necessary to specifically configure Matomo in order to accurately measure time spent on website: https://matomo.org/faq/how-to/faq_21158/. How do the answers to the questions above change depending on this configuration?
It depends on if you set the hear beat timer or not (and also sendbeacon).
With this enabled, the open tab should continuously inform Matomo that the page is active… But AFAIK, if the tab is “muted” (if you switch to another browser tab), this behavior is stopped.
I am not sure on the behavior if you leave the browser to another application (as your spreadsheet tool or mailing app), keeping the browser (and page) open…
Case 1: Open the page, do not leave the browser, then, 20 minutes after, navigate to an external website through a link (the session should be 20 minutes long)
Case 2: After 30 minutes of inactivity, Open the page, do not leave the browser, then, 20 minutes after, type the external website url directly in the address bar (the session should also be 20 minutes long)
Case 3: After 30 minutes of inactivity, Open the page, after 15 minutes switch tab and navigate on another website during 5 minutes… switch back to the 1st tab and do one of Case 1 or Case 2 action for leaving the page (no idea of the result… )
Case 4: After 30 minutes of inactivity, Open the page, after 15 minutes switch to another app (eg. spreadsheet, mail, etc.). 5 minutes after, switch back to the browser (still on the same page) and do one of Case 1 or Case 2 action for leaving the page (no idea of the result… )
yes, let me know what you think of these test cases, do they make sense?:
Case 5: open the page (which has an Youtube embedded video on it), do not leave browser, play Youtube video on the page, click on a separate tab, then, 20 minutes after, navigate to an external website through a link (the session should be 20 minutes long) —> would having the YT video play in the backend on that first tab mean it is an active session to Matomo?
Case 6: same as above, but having a MP3 audio file embedded on the page and play it