initial version already working as expected. Code extracted from existing Noel: Piwik Tracking Plugin