Customize Parameter action_name in piwi.js (and so on)


(Adrian Ministrator) #1

Adblockers with the EasyPrivacy list block the following calls according to the pattern:

.php?action_name=

If it were possible to rename this parameter by configuration setting? Otherwhise the tracking for these clients wont work. There are also a lot of affected Classes/Methods (e.g. piwik/core/Tracker/Tracker/Action.php and so on).


(Lukas Winkler) #2

Hi,

Check here for more information:


(Adrian Ministrator) #3

Hi Lukas,

thanks for your answer - but this is not the same (use)case.
We have don’t use /piwik.js and /piwik.php (we have a proxy script to access via g.js and g.php).

Also the pattern (EasyPrivacy) works oterhwise:
.php?action_name=

In my opinon this is a new feature request.


(Lukas Winkler) #4

Hi,

I know, but the linked github issue also has solutions for your issue.
E.g. the following hackish one:

copied from here


(Adrian Ministrator) #5

This is no more than a hotfix. I can change this in the affected Piwik files - but then I have to redo these changes with every single piwik/matomo update. I have proposed a configurable solution. That’s not the same.

Otherwise i would not post this feature request.


(Lukas Winkler) #6

That’s right.

If anyone wants to implement this feature, they are welcome to open a pull request.

Maybe in the next months someone on the Matomo team will have time to implement it.

But honestly I am not really looking forward to debugging Matomo tracking issues when every parameter is just a random string.


(Adrian Ministrator) #7

In the next months? :scream:

I aggree with you. But it doesn’t have to be a random string (the Parameter action_name). Maybe it is enough to rename the parameter action_name to name? I don’t think that the adblockers will block a Parameter name.


(Fabian Dellwing) #8

Yes months, there are currently 247 issues in the priority backlog: Priority Backlog (Help wanted) Milestone · GitHub

This is not counting for issues that target 3.5.0 or 4.0.0!


(Adrian Ministrator) #9

still no scheduled fix?


(Lukas Winkler) #10

Hi @gax ,

As no one on the Matomo team needs this feature, it isn’t on the todo list. But of course pull requests are always welcome.

But I am still not sure why you need to rename action_name as it only makes things more complicated. And if you want to avoid adblockers you don’t need to rename the GET parameters, but instead can simply switch to POST. (_paq.push(['setRequestMethod', 'POST']);).
Keep in mind that this way the data will not appear in your server logs and you can’t replay them in case your Matomo is offline for some time.