Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Refactor tracker code for clarity, modularity and so plugins can have more granular control over tracking #8317
This PR heavily refactors the tracking code to make it easy for plugins to tweak, change and extend tracking behavior. It moves a big chunk of the code currently in Visit::handle() to other plugins, like Goals, Actions, CustomVariables, etc.
Note: Though this PR implements enough changes for the plugin I'm working on, it doesn't completely close #8071, there's still more logic that can be moved out of core.
This PR introduces the concept of the RequestProcessor. RequestProcessors handle and tweak tracker behavior. To learn more, read the class docs for the RequestProcessor class.
This TODO list can be added to #8071 or to a new issue:
could you do here a little risk analysis and find out the list of plugin names that may break, because of this change? (from our open source and/or premium and/or client custom plugins)
It is acceptable breaking plugins that have a class extending Tracker\Visit in 2.15.0 (because Tracker\Visit is not tagged with
FYI searched with https://piwikcodesearch.herokuapp.com and couldn't find community plugins extending the Visit class. Found 3 Piwik Pro plugins though: https://github.com/search?q=user%3Apiwikpro+%22Piwik%5CTracker%5CVisit%22&type=Code