Open gasolin opened 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:
request
to fetch/axios
, query-string
to https://www.npmjs.com/package/query-stringurl-parse
to https://www.npmjs.com/package/url-parseEventEmitter
to https://www.npmjs.com/package/eventemitter3 / https://www.npmjs.com/package/eventsutil.inherits
to https://www.npmjs.com/package/inheritsI 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.
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?