Matomo.js is auto-updating: cannot write modification into it

(junkkk) #1

matomo is blocked by easylist: the name matomo.js/.php, AND the GET variable ?action_name=

note that if the action_name= variable is not the first one getting called, it is not blocked.
The solution is to create symbolic links of matomo.(php|js) files and to put another variable before the “action_name” in the URL:

sed -i -e ‘s/action_name=/a=b&action_name=/g’ matomo.js

this will call matomo with:

?a=b&action_name= …

this pass easylist filters.

however the matomo.js seems to be auto-updated very frequently and is overwriting the modification. Anyone has a solution to stop the file from being overwritten ? I’ve though about changing file’s permissions but I’d prefer a more indirect way.

(Fabian Dellwing) #2

Write a Plugin, this way your code will always be included in the JS.

(Lukas Winkler) #3

To extend on @fdellwing’s tip:

You need to add a tracker.js file to the plugin and Matomo will automatically add it to the main matomo.js