Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keep piwik.js filesize small by serving customized script #6546

Closed
wikiloops opened this issue Oct 28, 2014 · 3 comments
Closed

keep piwik.js filesize small by serving customized script #6546

wikiloops opened this issue Oct 28, 2014 · 3 comments
Labels
wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.

Comments

@wikiloops
Copy link

I have been using PIWIK for some years now, starting somewhere around version 1.7.
I just compared the filesizes of the piwik.js file, and it has increased from around 15kb (vers.1.8) to now around 24kb - which is still amazingly slim for the load of functionality offered.

Since there will propably even more features added in the future of PIWIK, it would not be surprising to see the filesize grow and grow, which might at some point turn into a nuisance, especially for those using PIWIK to track mobile devices.

From my point of view, it would be very beneficial if only those segments of the "core" would be transferred which are going to get used.
Not every website will need the ecommerce tracking, and many small websites may not even do any goal/conversion tracking.
The whole geolocation thing is out of bounds on shared hosting where a user cannot install the necessary ad-ons, and the newly introduced content tracking feature will propably not be needed by hobby programmers.

Since the piwik.js-file is fed to the visitors via the index.php-page, maybe it is possible to reduce the size of the file to transfer by assembling a custom js that filters away all the "unnecessary" code.
A simple cross-check with the plug-in-enabled setting chosen by the PIWIK admin might be all that is needed to find out which modules to serve.

Another approach on this issue might be a general what is "core" and what is "external" re-thinking.
If adding plugins will be made easier thru #6106, maybe the core can be slimmed a little for those just wanting to know if they have some visitors at all :)

@mattab
Copy link
Member

mattab commented Nov 3, 2014

Thanks for the suggestion!

to answer your concerns, we don't plan to increase the filesize much more. However we will lower the filesize once we remove JSON from it: #6093

@mattab mattab closed this as completed Nov 3, 2014
@mattab mattab added the wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it. label Nov 3, 2014
@beevoo
Copy link

beevoo commented Oct 25, 2023

Hi all, auditing a site pagespeed piwik js one of the biggest files to present
image
I downloaded the file and on my desktop it is 844kb big.
Using HTTP/2 it is better a higher number of smaller files, instead of a huge single file. Is there any way to split this one?
Aditionally, is there any way to identify unused js whithin the file and get rid of it?
Thank you in advanced!
Javier

@michalkleiner
Copy link
Contributor

Hi @beevoo, thanks for your comment on the issue. We already have an open issue related to this — #6106. Usually it's best not to comment on closed issues with new ideas/information as it can easily get missed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Projects
None yet
Development

No branches or pull requests

4 participants