Support » Plugin: Matomo Tracker » High load times of piwik.php (async not working?)

  • Resolved nicoter


    The plugin is essentially doubling my page load time because it takes a very long time to load the piwik.php file. I understand this is because the file is connecting to my Matomo server in the background.

    See screenshot (this is with async enabled):

    1) Does the async mode not work properly? If I remember correctly, other async implementations usually don’t show up in the waterfall diagram of the test.

    2) Why is piwik.php being loaded two times? Is this as intended or a bug?


Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author nir0ma


    This will be fix in 1.2.2 coming soon

    Thread Starter nicoter


    Awesome, thanks for efforts!

    Can’t wait for 1.2.2 🙂

    Plugin Author nir0ma


    1.2.2 is here ! But I’m not sure this will fix your load times as this might a server issue (I’m not having this issue).
    Let me know and if there’s a problem share your url for further investigation.
    Thank you and have a nice day !

    Thread Starter nicoter


    Hi @nir0ma,

    I did another check with version 1.2.2 of the plugin, see screenshot here.

    The issues I’m seeing:

    1) track.js is loaded in the header which is render blocking the page, better would be to load it in the footer like it was done before.

    Is there a reason this changed or can you revert this change so it loads in the footer again. AFAIK every major analytics tool advises to add their tracking code to the footer of the pages exactly for this reason.

    2) piwik.php is loading twice: first time without URL parameters and the second time with parameters:


    Is this as intended or what’s the reason for calling the remote server twice?

    3) For some reason Matomo isn’t tracking the visits when the “Fast Velocity Minify” plugin is used. This used to work before the recent updates, although I’m not sure if 1.2.1 or 1.2.2 introduced the problem.

    You can run this check for yourself at and then look at the waterfall diagram.

    Thanks 🙂

    Plugin Author nir0ma


    Hey @nicoter

    Check v1.2.3, this is just a minor fix to load track.js in the footer.

    To reply to your questions :
    1 – Check 1.2.3 this should be ok
    2 – Piwik.php is just acting as a proxy, the double call is intended. The first request call the local file and download the remote js tracking code if necessary, or serves it as is. Then the second call send the tracking request to your remote installation of matomo. In fact, most of the time, remote server is called only once (second request) as the first request is cached.
    3 – Didn’t had time to check with fast velocity plugin, let me know if this is better now !

    Thank you 😉

    • This reply was modified 3 years ago by nir0ma.
    Thread Starter nicoter


    Hi @nir0ma

    Muchas gracias for putting it back to the footer!

    2) I see, although I don’t think the 2nd request will ever be cached because that would mean no data would be passed to the Matomo server.

    3) This still doesn’t work. It’s strange because this worked previously, but by excluding it from the cache it works for me.

    One more time: Thank you for this plugin and the support 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘High load times of piwik.php (async not working?)’ is closed to new replies.