How to provide compressed matomo.js file?

Dear Motomo Support,

Do you have any compressed version of matomo.js? our developer use developer tool to do some test and found the size of matomo.js is too high. you can see from the screenshot.
I’ve configured on nginx for compress already, but it seems it’s not related with nginx, it’s related the matomo.js file self.
here is the configuration of nginx
gzip on;
gzip_disable “msie6”;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;

Hi @frank83
Why do you wrote it is not compressed? on yous screenshot, I don’t see the compression information…

Hi Philippe,

what do you mean I wrote not compressed? I’ve written gzip on in the nginx configuration file. But after I gzip on, it still does not work as the screenshot. I’ve tried to gzip matomo.js manually then it works, but in the meantime I got a warning from the system checking. maybe you can see from the attached file.

Hi @frank83, your Devtools screenshot does not explicitly show that the file was actually transferred uncompressed, that’s certainly what @heurteph-ei wanted to express. To tell this, you may want to enable the column “transferred” (or so, cf. my German screenshot) in the network tab (to do so, right click on a column header and on-check the column name in the list).

If your server did not compress it, the kB values of “transferred” and “size” would show equal values. Also have a look at the reponse headers – my (Apache) server sends content-encoding: gzip on having compressed. Maybe nginx sends something similar?

1 Like

Hi @tomkyle , I found it, it works now for the gzip compression function. Unfortunately there is a conflict with heatmap function once I manually generate gz file. I am not sure if you meet this kind of problem or not if I enable gzip.

Hi @frank83
You need the matomo js file to be writtable in order to make Heatmap work. Please check the server system check (:gear: > Diagnostic > System Check) to see if there is no other problem in the system that could make Heatmap not working…
Also, as Heatmap is a premium feature, you can directly ask for support by email to the Matomo / Innocraft support team…

I see. Thanks a lot @heurteph-ei . I will ask the support team.