This gem is heavily based on two preexisting works, Riopro’s riopro-piwik and Halfdan’s piwik-analytics. The former was basically what I was after, but it is unfortunately half-baked and development stopped in 2008. I also used the Controller Mixin paradigm from Halfdan’s gem to implement Piwik::Trackable, that gives developers the ability to append tracking code on multiple websites running from the same application – if they so wish.
autometal-piwik allows users to interact with a Piwik installation through an object orientated interface. It can be used standalone or in a rails application, the only difference being where the configuration file is stored ([home]/.piwik, or [RAILS_ROOT]/config/piwik.yml in the second).
Currently, only UserManager and SiteManager methods have been implemented, and the plugin comes with CRUD tests.
Documentation is quite limited at the time or writing and the plugin is still under heavy development and real-world testing. Feel free to play around with it (or implement the methods that are of interest for you and submit a pull request
), but bear in mind that this plugin is still not production-ready. Watch this space for updates.