@sslavic opened this Pull Request on June 30th 2014 Contributor

So far adding plugins was only accessible through Piwik public API, Piwik.addPlugin.
Problem with this was that it was not possible to register plugins before any event has been handled, since Piwik singleton initialization (and any plugin registration) happens after _paq is processed and this is too late - any registered plugin will not be included in processing events fired by evaluation of _paq array items.

This patch enables registering Tracker plugins on Tracker itself, so addPlugin can be part of _paq instructions.
It is not enforced when addPlugin instructions will be processed (e.g. addPlugin is not part of alwaysFirst), for flexibility - e.g. one can have trackPageView evaluated without plugin, then addPlugin for all the next steps, or one can have addPlugin pushed first to _paq, and then trackPageView, if plugin should be applied for trackPageView as well.

@sslavic commented on June 30th 2014 Contributor

The build has failed because of instability of test environment. JavaScript part of the build is green.

@sslavic commented on June 30th 2014 Contributor

Related forum discussion: http://forum.piwik.org/read.php?15,117202

This Pull Request was closed on June 30th 2014
Powered by GitHub Issue Mirror