• Resolved nicoter

    (@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): https://i.imgur.com/BTUDkF6.png

    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 Gtmetrix.com test.

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

    Thanks

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

    (@nir0ma)

    This will be fix in 1.2.2 coming soon

    Thread Starter nicoter

    (@nicoter)

    Awesome, thanks for efforts!

    Can’t wait for 1.2.2 ??

    Plugin Author nir0ma

    (@nir0ma)

    @nicoter
    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

    (@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:

    /wp-content/plugins/matomo-tracker/inc/frontend/piwik.php?action_name=REDACTED&idsite=99&rec=1&r=789589&h=6&m=48&s
    =3&url=REDACTED&_id=4a51c880e614bbd8&_idts=1539524883&_idvc=1&_idn
    =0&_refts=0&_viewts=1539524883&send_image=1&pdf=1&qt=0&realp=0&wma=0&dir=0&fla=0&java=0&gears=0&ag=0
    &cookie=1&res=1367x858&gt_ms=346&pv_id=LjwX3m

    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 https://gtmetrix.com/ and then look at the waterfall diagram.

    Thanks ??

    Plugin Author nir0ma

    (@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 6 years, 1 month ago by nir0ma.
    Thread Starter nicoter

    (@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.