matomo-org / matomo-nodejs-tracker

A Node.js wrapper for the Matomo (Piwik) tracking HTTP API
MIT License
117 stars 42 forks source link

use for React Native App tracking #59

Open gasolin opened 5 years ago

gasolin commented 5 years ago

I found matomo support tracking http API and provided the js client https://developer.matomo.org/api-reference/tracking-api

Instead of use https://github.com/BonifyByForteil/react-native-matomo which requires some Android/iOS SDK dependencies (not possible to do so with managed Expo environment), could I use matomo-nodejs-tracker for React Native App tracking?

gasolin commented 5 years ago

Checked the source and found the matomo-nodejs-tracker use some nodejs API, its not possible to reuse it directly for RN mobile app.

https://github.com/matomo-org/matomo-nodejs-tracker/blob/master/index.js

But I think its possible to wrap node specific API with the frontend-compatible API, to make it work in both environment, like replace:

donni106 commented 4 years ago

I have started a package to be able to track from Expo project: https://github.com/donni106/matomo-tracker-react-native

A very first integration works with manually firing the tracking of actions.

Feel free to use it and create feature requests.