New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
total time of visit is not the sum of times of page visits #9610
Comments
What's shown on hover for the 4. action (the search)? I checked some as well on dem.piwik.org but it was always ok |
I can reproduce it on demo.piwik.org for Piwik forums. Thx! aggregating each action individually only makes like 1hour 15minutes but it shows as 2hours 33min. The 2hours 33 min are probably actually right but some actions might not be updated. The second last action has only 10 seconds so I presume a date was never set there. |
The problem is the time spent for the first action should be like an "1hour 15min" or so but is only 10 seconds. By looking very quickly through the code I already found one bug here: https://github.com/piwik/piwik/blob/2.16.0-b6/core/Tracker/Visit.php#L249-L253 . We have a visit standard length of 30 minutes. If time on action spent is > 30 min (which is possible with heart beat feature) we save max 30 minutes for an action instead of the actual "1hour 15min". However, as there is 10 seconds set, there must be another bug on top. Buggy seems also the code just a few lines on top. We probably return max 15 seconds here if we sent ping requests every 15 seconds: https://github.com/piwik/piwik/blob/2.16.0-b6/core/Tracker/Visit.php#L244-L248 Heart beat sends constantly ping requests updating From what I can tell it seems quite buggy. Thx for the report! |
maybe this one #9646 |
Total time of a visit
shown for a visit e.g. in visitor log
is not always the sum of times of all page visits
an example is shown in attachments
if this total time of a visit is not only shown but also used to calculate other things like avarage duration of a visit, it may have a big imapct
The text was updated successfully, but these errors were encountered: