matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.91k stars 2.65k forks source link

Have a minimal JS tracker with only very basic features #17094

Open tsteur opened 3 years ago

tsteur commented 3 years ago

Just saw https://minimalanalytics.com/ and figured it could be quite nice for some people where performance matters and they only use basic feature set and no cookies.

We could offer like only trackPageview and trackEvent as part of a very minimalistic JS tracker. By default gzipped the regular matomo.js is > 50KB vs this could be maybe 1KB and be quite some difference in terms of performance.

eg developer.matomo.org is only 200KB transferred data, matomo.org roughly 600-700KB or less depending on resolution etc.

It would also save a lot of time as it wouldn't need to parse and execute 200KB JS. Especially on mobile etc

Findus23 commented 3 years ago

I guess this could be maintained separately from Matomo as another project trying to keep the size to a minimum while still supporting the features 95% of all users need.

Maybe if I got too much time at hand, I'll look into it.

Findus23 commented 2 years ago

An experimental implementation of this idea is now available at https://github.com/Findus23/MatomoLiteTracker Depending on which features are used the final JS size goes below 1KB minified and gzipped.

If anyone wants to try it out and report their experience with it, please get in contact with me.