Keeping your website fast is essential in providing a great user experience and in ensuring both higher engagement and higher conversion rates.
Matomo (Piwik) automatically keeps track of how fast your website delivers content to your visitors and will display this information to you for each of your webpages.
Using this information you can benchmark your website and webserver, and keep an eye out for performance regressions.
Overall Website Speed
In the Visitors > Overview page, Matomo displays the average generation time for every page in your website:
Definition of Average Generation Time: this value represents the average amount of time it takes to load a page in your website and includes both 1) the time it takes for your webserver to generate the page, plus 2) the time it takes for your visitor to download the page response from the server.
You can use this value to quickly gauge the speed of your website.
Individual Page Generation Speed
If you need more detail, you can view the average generation time for individual pages on the Behaviour > Pages and Behaviour > Page titles Matomo pages:
The last column displays the average amount of time it takes to generate the page the row represents. Like the overall average generation time above, this value includes both the time it takes for your webserver to generate the page, and the time it takes for your visitor to download it.
We recommend you try and keep the ‘Avg. generation time’ of all your webpages below 1 second.
Making sure your website stays fast
Because Matomo stores the generation time for every action a visitor makes, you can compare your website’s performance today with it’s performance in the past.
Clicking on the Row Evolution icon will display a historical view of the ‘Avg. Generation time’ for a single page:
If you want to see how your overall website speed changes over time, click on the smaller graph in Visitors > Overview page:
This will plot the data in the small graph on the larger graph at the top of the page:
Comparing page load time of various subdomains and pages
The Row Evolution feature can also be used to compare the generation time of various pages and derive insights on the performance of different parts of your website.
Compare multiple rows in a report that displays the average generation time to see something like this:
Tracking page speed with each visit
If you use the Tracking API directly you can specify the page generation time (in milliseconds) in the gt_ms query parameter.
If you use the Server Log Import toolkit and your logs contain the page load time, you can specify a custom log format containing a regex group named generation_time_milli to import the data into Matomo.
Generation time for each pageview
You can see the generation time of each individual pageview by hovering over the list of pageviews under “Visitors > Visits log”: the generation time is displayed in the tooltip.
Once the page speed data is tracked, you can request this data for individual pageview by using the
Live.getVisitorProfile APIs. For example in XML it will return the generation time time for each individual pageview as follows: