actions/pages "average time on page" seems to be broken
please see attachments for example:
2 visits (filtert by shown segment)
show visit times in visitorlog (total and for page on hover)
but in actions/pages average time is 0:00
It's currently like this "by design". We might fix this in Piwik 3.0 but it's not clear yet. We cannot fix it in 2.X as it requires DB schema change for log tables which would take a very long time.
Background: The avg_time_on_page is not written for last action, only
visit_total_time is updated for heartbeat. To do proper calculation we always need to know what
last_idlink_va was and update time spent on the actual action, not on the next action. To have it backwards compatible with existing data will be quite challenging but doable.
thanks for fast and detailed answer.
I think it's quite important to have a possibility to see average time on special types of pages.
it's important to see when making changes on a page how these are liked by visitors.
On lots of types of pages this could be done easily looking on development of average time on page.
If it rises, the visitor likes it more than before. If average time on page is lowered the change works opposite as planned...
(since it's not working as expected, one could think of giving it a bug label, couldn't one?)
It's definitely a bug and a fix is needed at some point indeed. Otherwise the
avg_time_on_page in the Actions report is simply not correct.
Could we maybe fix this in Matomo 4 @tsteur ? assigning tentatively
I'm not sure we're wanting to this as it means more selects/updates in the tracker... I would certainly not do this in Matomo 4 though as it's not a breaking change and does not require any DB updates etc and can always be done afterwards. It will only delay the release by a few more days which is not worth it.