Why do some visitors have no time spent on my page?

Hello,

in my visitor log I see few visitors with actual time spent, while most of them do not seem to spent any time on my page.
Initially I assumed these were just bots so I created a segment, filtering out anybody who spent less than 1 sec on my page.
After reviewing activity though, this doesn’t seem to be a valid assumption and these are actual visitors to my page.

Could somebody please explain, how the time spent is calculated, what influences the time spent, what it means if there is no time for a visitor and if I can somehow check if a visitor is a bot or not?

Thanks!

Hi,

In theory Matomo can’t measure how long someone stayed on a page, as it only tracks once on pageload. So to calculate the time spent it just takes the time of the next page load. This obviously doesn’t work with visitors who only opened one page.

But you can configure Matomo to ping the server every X seconds as long as the visitor is on the page. This collects more precise data, but increases the server load a bit.
https://matomo.org/faq/how-to/faq_21824/
https://developer.matomo.org/guides/tracking-javascript-guide#accurately-measure-the-time-spent-on-each-page

Thanks, that answers my questions.