By default, Matomo (Piwik) will accurately track the time spent on all your pages, except the last page view of the visit, as Matomo counts the “Time spent on page” as 0 seconds by default.

When your visitor views only one page in the website, the “Visit” duration will be set to a default of 10 seconds (The “Time spent on page” will still be tracked as 0 seconds).

-> It is possible to configure Matomo to track the time spent in the visit accurately (the “Visit duration” metric), and including the time spent in the last page view of each visit.

Learn more about Accurately measuring the time spent on each page in the JavaScript Tracking code guide.