Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
It would also make it more robust since tracker.trackFooBar() would result in an error when it is not defined but in the push method we can log or ignore certain methods, etc
It would also work with global tracker plugin methods (the ones that have ::) and works perfectly with custom tracker methods. Even when a plugin is uninstalled tracking would still work because tracker.MediaAnalytics.scanForMedia would not result in an error when done like this: tracker.push(['MediaAnalytics.scanForMedia']).
Easier to port code between _paq.push and multiple trackers. Because syntax is the same it is much easier to move from one solution to another.
By default tracking is done like this:
_paq.push(['trackFooBar', 'param1', 'param2])
.When working with multiple trackers (and tracking different data to different sites) the same would be
I think it would be more consistent to always use a push method as well instead:
This simplifies some docs greatly, for example http://developer.piwik.org/guides/media-analytics/reference where we always need to explain how and where to call different kind of plugin tracker methods.
It would also make it more robust since
tracker.trackFooBar()
would result in an error when it is not defined but in the push method we can log or ignore certain methods, etcIt would also work with global tracker plugin methods (the ones that have
::
) and works perfectly with custom tracker methods. Even when a plugin is uninstalled tracking would still work becausetracker.MediaAnalytics.scanForMedia
would not result in an error when done like this:tracker.push(['MediaAnalytics.scanForMedia'])
.Easier to port code between
_paq.push
and multiple trackers. Because syntax is the same it is much easier to move from one solution to another.