@glenskie16 opened this Issue on June 17th 2020

Hello, so i have noticed that if someone is on a page and I have it Pinging like every 30 seconds it only works up to a certain point. BUT if i increase the default lifetime to lets say an hour, and that person leaves after 35 mins and comes back 10 mins later... that 35min action registers as 45mins... even though after that 35 mins there were no 'pings' How do i modify / fix this? to where it stops counting that action as active or what ever when the pings stop?

@tsteur commented on June 17th 2020 Member

@glenskie16 thanks for creating the issue. If I understand correctly you want the time on page to exclude the time the user is not actively on the page. If the user is away for 35 min, it shouldn't add these 35 minutes. Is that correct?

Then this issue would be a duplicate of https://github.com/matomo-org/matomo/issues/9540

There are also maybe other related issues like https://github.com/matomo-org/matomo/issues/9543

@glenskie16 commented on June 17th 2020

So lets say im watching a video on the page for 35 mins. Then close the tab and do something else, then i come back in 10 mins. In the dashboard that 35 min action is counted as 45mins. is there a way to only count up to the very last 'ping'?

@tsteur commented on June 17th 2020 Member

you mean the visit time? Or what exactly do you refer to?

@glenskie16 commented on June 17th 2020

yes, visit time. So another example.

I have a user reading a document for 5 mins, then closes my website all together which cuts off my "pinging" to matomo. When that user opens my site back up lets say 30 mins later, that first action that was supposed to only be 5 mins shows up as 35 mins. (my default time is set to 1 hour). But shouldnt the old action only be 5 mins and not add the time that was spent between these two actions without a ping?

to fix this i was maybe thinking of shortening the default time to like 5 mins, BUT when i do this... the pings end at 5 mins, and do not extend that 5 mins out from that... or even make a new action? Am i doing something wrong? My users can be on one page for up to 8 hours in a day for "live streams" that my company provides.

@tsteur commented on June 17th 2020 Member

@glenskie16 this is expected behaviour in this case. You could define a shorter visit time see https://matomo.org/faq/general/faq_36/

Then it would be two visits each with a lower visit time.

There are also ways to create new visits dynamically based on your own rules: https://matomo.org/faq/how-to/faq_187/

The visit time does not currently not mean the user was engaged for say 35 minutes etc. If this was wanted, that be great new feature for a custom plugin. (or we could also consider adding this in the future in core)

@glenskie16 commented on June 17th 2020

Okay thank you. is there something in the database keeping track of the 'pings' ? maybe i could write something quickly to calculate based off that

@tsteur commented on June 17th 2020 Member

The visit total time is based on the matomo_log_visit.visit_total_time column if that helps?

Powered by GitHub Issue Mirror