polimediaupv / paella-user-tracking

A set of plugins for user interaction tracking
0 stars 5 forks source link

Matomo User Tracking: Possibility to configure other Matomo file names than matomo.js/php #6

Closed snoesberger closed 5 months ago

snoesberger commented 11 months ago

It would be great if Matomo User Tracking could be configured to load files other than matomo.js and matomo.php. In Paella 6 this was already possible with the config parameter "tracking_client_name" in the MatomoSaverPlugin.

In our Opencast environment this would help us to aggregate more complete and accurate user statistics as the matomo.js/php files are often detected by AdBlockers.

miesgre commented 8 months ago

I like the idea.

I'm not sure how this work or how I can configure my matomo to test it.

Its simply to change the matomo.js and matomo.php to <custom_name>.js and <custom_name>.php?

https://github.com/polimediaupv/paella-user-tracking/blob/b0296aafa5740cfe47cd2d92dc4696fd1b662e72/src/plugins/es.upv.paella.matomo.userTrackingDataPlugin.js#L131-L134

And what do I need to change on my server to make this work so I can test it? Do you have any link to the documentation?

snoesberger commented 8 months ago

Its simply to change the matomo.js and matomo.php to <custom_name>.js and <custom_name>.php?

Yes, it is as simple as that.

And what do I need to change on my server to make this work so I can test it? Do you have any link to the documentation?

Have a look at the following repository, it explains what you need to change on the Matomo server: https://github.com/0x11DFE/Matomo-Anti-Adblock

luniki commented 6 months ago

I am currently in the process of creating a fix for this issue. Please have a look at https://github.com/luniki/paella-user-tracking/commits/feature/configure-tracker-urls/

luniki commented 6 months ago

I have tested my fix in my local installtion. I had to duplicate the #load method of the matomo plugin in the engage-player-paella-7 module to do this. This branch contains my changes:

https://gitlab.elan-ev.de/opencast/bern/opencast/-/commits/matomo/customizable-tracker-urls

miesgre commented 6 months ago

Thanks @luniki, can you make a Pull request? I don't understand why you need to duplicate the load method. and I can not access ti the gitlab you linked.

luniki commented 5 months ago

I will create a pull request right now.

I duplicated the load method in the mentioned repository just for testing my fix without waiting for a proper release of this npm package here.

miesgre commented 5 months ago

I duplicated the load method in the mentioned repository just for testing my fix without waiting for a proper release of this npm package here.

Ok, thanks!