I am currently trying to build a Piwik plugin to analyze all HTTP request sent to our target application to find out more about the user behavior.
This is because our application is run out of another application an it is necessary to see what is sent so the application als initial values.
The main steps are:
Send data to Piwik plugin
Parse data with eighter the plugin itself or e.g. a Java web service
Load data to Piwik database
I’m not actually clear about how it should be done properly.
First I was trying to use the ‘trackEvent’ event, but I am not sure which hook could possibly intercept that event.
My second idea was to use custom variables, but that would be impossible due to the amount of parameters (initial values, filters used by user, input filled into several fields etc. etc.).
The third idea was to send an request directly to the plugin like url/module=ModuleName&method=Module.processBackendRequest…
This -in my opinion doesn’t work for the class extending Piwik\Plugin, but only for the Controller / API?.
Last I found out that it would be possible to invoke function main of Tracker.php with arguments. this could do it but I have no idea how to invoke it.
Would you have any suggestions?
I would try to write that plugin generically enough to contribute it to Piwik [If it is even possible to implement such a plugin (I’m confident I would be able with your initial help)].
Thank you very much in advance.