Pagespeed Optimization

Hello everyone,
I am relatively new to matomo, but have added it to our primary website to provide analytics services to us. Im trying to put our site on a cdn, and optimizing the sites code for pagespeed. On mobile we need some help… which brings me to post this question.

One of the issues Pagespeed insights is complaining about is Reduce unused JavaScript. And its claiming that matomo.js should be reduced from 196.8kib by 104.6kib.

Is there a minified version of this to use, or a way to slim this down? I do have your growth extension pack installed - so im not sure if this is contributing to the size of this file.

Any help is appreciated.

The file itself should already be minified (check this). Then you cannot do anything on this point.
Probably your auditor complains that some methods are not used in the script. But as it is a toolbox, it would be difficult to remove unused functions, as maybe you don’t need some for some kind of user behaviour, but for other user behaviour you would need them. Eg. in a scenario the user doesn’t trigger the download event, then functions about download behaviour won’t be called. But if you remove these functions, you won’t ever be able to track downloads…
At last, 196.8kib file is not huge…