Tracking API take long waiting time in Waterfall test


Waterfall test showed piwik take very longer waiting request for smaller size data compared from other request in the page.

When i open the URL it only the smaller Image…
transfer, about 300ms-600ms

Here the test repot from GTMetrix for my site
I get the same error for newer version of PIWIK…
I don’t know how to fix this, search on the web still not get solution…
Can you give me the solution?



In theory even though your tracking requests are quite slow (they should be <200ms) that shouldn’t be that much of a problem. They are loaded async and deferred, so only after the visitor is able to interact with the complete website.

But I totally get that you might want to get this down.

You could try to speed up your Matomo instance a bit:

Especially a fast database on an SSD which has enough RAM can help.

But if you are really annoyed by this and want to get the requests down to ~50ms you can look into queued tracking:

Then Matomo will only put the data as is into a query (either in the MySQL/MariaDB database or in Redis) and e.g. if the query is at a specific length (e.g. 10 entries) all of them will be handled by Matomo at once.