Optimise graph widgets in iframe

Hi Matomo Team,

We currently have a page on our website that calls our Matomo instance to retrieve an embedded Matomo widget to display a graph of views based on the pageTitle segment like the URL below.
Depending on the views over time and the date range, this graph can take quite a long time to load initially (sometimes up to 30 seconds), so I was wondering if Matomo had the ability to pre-process or cache this type of data so the loading to the end user is quicker?


When setting up we followed the Configuring Matomo for speed document and have had auto-archiving enabled since we first set up the Matomo instance; however fetching data can still take quite a long time on the first load - specifically embedded graph widgets.

Thank you for your help

If you avoid using date range or not terminated periods (instead, use only full days, full weeks, full months, or full years) or segments that are not registered in Matomo, you will be able to speed-up the widget display. Indeed, its data will be preprocessed by the archiving process…