How do I improve accuracy of “Time spent on page” and “Visit duration” metrics?
By default, when a user visits only one page view during a visit, Matomo will assume that the visitor has spent 0 second on the website. This has a few consequences:
- when the visitor views only one page view, the “Time on Page” will be 0 seconds and the “Visit duration” will be set to the value of the config flag
default_time_one_page_visit
, which defaults to 0 seconds. - when the visitor views more than one page, then the last page view of the visit will have a “Time spent on page” of 0 second.
It is possible to configure Matomo so that it accurately measures the time spent on the last page of a visit. To better measure time spent on the page, follow these instructions in the JavaScript Tracking Client guide.