Piwik Edit Tracking Script?

Hello All,

Does anyone know if I can edit the tracking script that the Piwik extension generates directly from the wiki?

Or am I best to create my own and add it to all the pages in some other way?

Essentially I want to add the user to the piwik userID field which I need because all my users are NAT’ed and have the same IP.

Thanks,
Ben

Isn’t that what’s user tracking in the piwik extension is for?

See https://extensions.xwiki.org/xwiki/bin/view/Extension/Piwiki%20Integration

Indeed, but I’d like to link it into the Matomo (Piwik) userID variable instead of a custom variable. I’m hoping this will allow me to view the information on a per user basis within Matomo UI. At the moment Matomo visitor’s profiles amalgamate page views of multiple users (because everyone is one the same IP)

This is what I want to implement: User IDs User Guide - Reports - Matomo Analytics

This actually sounds like a bug of the extension that should use the standard field since one exist. Would be great if you could create an issue on Loading....

I don’t really know this extension but changing the field used is probably easy. The source can be found on GitHub - xwiki-contrib/application-piwik: Extension to add Piwik tracking to an XWiki instance and the interesting part here seems to be application-piwik/src/main/resources/XWiki/PiwikCode.xml at master · xwiki-contrib/application-piwik · GitHub. On your side it means editing XWiki.PiwikCode wiki page with object editor and open the XWiki.UIExtensionClass object.

Pull request is very welcome if you can make something more standard from Matomo point of view work :wink:

Thanks @tmortagne, I’ve successfully implemented in my instance and will create a pull request after a few more days of testing.

Jira also raised: Loading...