• I was just checking my site’s plugin performance, and found that wp-piwik is taking up 50% of all the time for 18 plugins, (~.52 seconds out of 1.04 seconds total) Is there any way to reduce the impact of this particular plugin? I was wondering whether adding the tracking code manually into the header might help, or is the performance problem elsewhere in the plugin? Any other ideas for how to reduce wp-piwik’s footprint?

    Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author braekling

    (@braekling)

    I bet you are using the toolbar graph, aren’t you?

    You should disable it if you are using the HTTP API and the connection between your Piwik and your WordPress host is quite slow. Or, if WordPress and Piwik are running at the same host, you can switch to the PHP API to increase speed.

    Adding the tracking code should not cause performance issues.

    Thread Starter Ezjomo

    (@ezjomo)

    Piwik and WP are running on the same host… I just did a little more digging, and discovered that the main slowdown is on the /wp-admin/ page, which affects me, but not site visitors, (I was mainly concerned about site visitors).

    Thanks for the tip about PHP API, I just activated it, so we’ll see how it goes.
    Thanks for responding, I appreciate it!

    Plugin Author braekling

    (@braekling)

    But you are using the toolbar graph? This may explain why there is a slow down if you are logged in. Otherwise such a massive slow down should not happen, neither in your admin area.

    Thread Starter Ezjomo

    (@ezjomo)

    No, I am not using the toolbar graph.

    How do I double-check that the PHP API is working? I tried it, but that made my site load time quadruple, (“piwik.php” took 5.2 sec to load) When I set it back to HTTP, then site load time went back to normal.

    Plugin Author braekling

    (@braekling)

    Piwik.php? Are you using the proxy code? This causes an additional HTTP request, because the proxy script has to request the tracking script from Piwik and to deliver it to the user. Please try without using the proxy script. (Btw. in this case the issue should also affect your visitors.)

    Or is the piwik.php call the call performed by the tracking code? If so, you should check your Piwik setup.

    Thread Starter Ezjomo

    (@ezjomo)

    I’m using the Default tracking. I presume piwik.php is the call performed by the tracking code…

    This is what I’m seeing:

    Screenshot

    Plugin Author braekling

    (@braekling)

    Yes, this is caused by the tracking code which means by Piwik itself, not by WP-Piwik.

    Please have a look at Piwik’s documentation on optimization…
    https://piwik.org/docs/optimize-how-to/
    … or have a look at the Piwik forums…
    https://forum.piwik.org
    … there are already some threads running about this topic.

    Thread Starter Ezjomo

    (@ezjomo)

    I searched Piwik forums, but didn’t seem to find much that would help, there was one thread that described a similar problem (piwik.php takes 8 sec to load) but there was no answer as to a solution.

    I only get 10-15 visitors per day, so most of the “big site” optimizations probably won’t make much difference for me… ??

    Plugin Author braekling

    (@braekling)

    There are several threads about a slow tracking code: https://forum.piwik.org/search?q=piwik%20slow%20tracking%20code If your problem is not discussed there, maybe you can create your own thread.

    I can only give support on WP-Piwik, not on Piwik itself. But some of the optimisations are also meaningful for small sites. For some reason your Piwik setup seems to be very slow, so every optimisation may be a good optimisation. ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Any performance benefit to adding tracking code manually to header?’ is closed to new replies.