Total time spent / visit duration?

Is there a way to get the total time all visitors have spend on a website?
The Visit overview doesn’t include this. The metrics per page are all averages.

The only way to do it now would be to go through the visits log and add everything up manually…

I did find on Behavior > Page titles, clicking Export, selecting json.

  • sum_time_spent was 0, which is weird since the visits log does show plenty of >0 visit duration.
  • entry_sum_visit_length is 722, but I’m not sure which unit this is.

I have a Visits over time widget on my dashboard, making an json export from that I get:

  • sum_visit_length with 1296, but again not sure of the unit.

Also note that when I enable “Format metrics” in the export settings these entry_sum_visit_length and sum_visit_length remain plain numbers.

Visitors > Visits Log, clicking the little Export button at the bottom, selecting CSV using a high number for the row limit.
Then you can look up the visitDuration column, and by using a simple SUM calculation get the total total.

I don’t understand why this is so hard to do though.

Thanks Peter! Your answer saved me time.
Yes indeed this would be a good metric to add to Matomo’s default reports.

Hi @peteruithoven
If you want to get total duration, just go to the Visitors Overview:

Then just multiply the number of visits with the average visit duration, and you get it!


In this case, the total visit duration is 9,140 * 0:04:12 = 26d 15:48:00

1 Like

Thanks Phil, indeed I get roughly the same value.