@pankajparashar-zz opened this Issue on March 22nd 2017

I'm planning to use Piwik for a website that gets a lot of traffic. I'm interested in knowing if there is any analysis done by anyone on, by how much using Piwk affects the performance of a website (both client-side and network performance).

I've searched across the internet and have found mixed responses on this topic. It would really be helpful to know from the core team members of the project if there is any performance penalty (no matter how insignificant) on using Piwik.

@tsteur commented on March 22nd 2017 Member

by how much using Piwk affects the performance of a website

There is no such single answer. It depends on many things. Like how you embed Piwik, how fast your server is, where your audience is located, whether you server the piwik.js eg via CDN, whether you have proper caching in place for piwik.js and gzip, whether you load it from same domain or different one, how "big" your website is in terms of files that need to be loaded and size etc. Also it depends on how you define "performance". Do you mean page load time? page ready time? Do you mean fps when scrolling or doing something on the website etc.

In general there should be once a request to piwik.js and then it should be cached. It is only a few kb and should be fast yet still user needs to load it. If performance is super important, I'd recommend to have a look and embed it eg like this after page load (with the risk of missing some visitors to be tracked): https://github.com/piwik/piwik/issues/9077

Then there is usually one request eg. per pageview which is like only a few bytes and depending on your server can take anything between 4ms and like 500ms. This is in the background though and user shouldn't notice it. Also doesn't use much on the network as said only few bytes.

If you use premium features like Media Analytics or Form Analytics there might be more requests while a user watches a video or uses a form but they all have small footprints.

Another thing that may affect performance is when clicking on an outlink (to different website) and Piwik tracks it, then we may delay the opening on the other website by like 300ms or 500ms to make sure the tracking request to measure the outlink is sent.

@tsteur commented on March 22nd 2017 Member

I recommend you do some testing as it is always specific to your requirements and your environment etc.

@paulo-graca commented on January 18th 2019

Many thanks for your answer. I would like to know if you recommend a server side solution, meaning every client requests are processed and another request is made to Piwik from the server side. Does this affects performance, is it a good way to go?
Thank you in advance!

@tsteur commented on January 18th 2019 Member

If you track server side yes then likely it will affect performance of your site unless you only queue the tracking request there for example and do not wait for a response for example.

This Issue was closed on March 22nd 2017
Powered by GitHub Issue Mirror