How can I use Piwik in an Ionic 2 project?

I would like to use Piwik to track user statistics in my cross-platform app developed by Ionic 2.
The only problem is that how can I integrate Piwik in my Ionic 2 project???

Attention, Ionic 2 uses Angular 2 not AngularJS.

1 Like

I found https://github.com/DefinitelyTyped/DefinitelyTyped/blob/types-2.0/piwik-tracker/index.d.ts which should enable pretty good integration of the tracker for Angular 2 / Ionic 2

a declare var _paq: any;
should allow for event tracking: Event Tracking - Analytics Platform - Matomo but so far I did not have any success

By the way: changing the date slider revealed all the collected data ; )

Trying to get it all set up I stumbled upon Angulartics2
But I stumbled upon some errors. Do you have a hint what is wrong?

Thanks a lot!

if you have tried (successfully or not) to track your Ionic / Cordova mobile app with Matomo, it would be great if you can leave a comment in the new issue we have created today: Track a Cordova / Ionic app with Matomo · Issue #14375 · matomo-org/matomo · GitHub

Looking forward to hearing from you on Github and maybe we can help with any issue you encounter