AVG. TIME ON PAGE metric shows wrong values

Hello,

In the Behaviour > Pages report the AVG. TIME ON PAGE metric shows very little values (just a few seconds) for all pages.

The heartbeat timer is already enabled according to this guide:
https://developer.matomo.org/guides/tracking-javascript-guide#accurately-measure-the-time-spent-on-each-page

When checking the Visits Log most sessions show a correct Time on page.

While searching for issues with AVG. TIME ON PAGE I mostly came across old threads from 2015 and earlier. It seems there probably was an issue at this time but don’t think it would still exist in 2022.

Is anyone else facing this issue? Any help would be appreciated.

I have found this Matomo issue:
https://issues.matomo.org/9198

This seems to be exactly the issue I’m facing here. Someone mentioned a “hack” (commenting out a line) how he could resolve it.

But I’m unsure if I should try it out because I don’t want to mess up my Matomo instance :slight_smile:

Any help would be appreciated to see correct average time on page values in the Behaviour > Pages report. Thanks.