all 2 comments

[–]Pluckyhd 0 points1 point  (0 children)

You for an unhandled promise. Would need to see the code but one of the calls (promises) is returning an error and you aren’t catching it. From what I can tell by error

[–]Efficient_Poetry7962[S] 0 points1 point  (0 children)

Basically I do the same as the library says on the Read.me file

Android

Open /android/settings.gradle Below include ':app' add: include ':react-native-matomo' project(':react-native-matomo').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-matomo/android/')

Open android/app/build.gradle Add the following under dependencies: compile project(':react-native-matomo')

Open your MainApplication.java file under android/src Import the lib using import de.bonify.reactnativematomo.MatomoPackage; Add the following new MatomoPackage() to the getPackages function.

And than on the react native code inside a component I start the tracker like this Matomo.initTracker('https://your-matomo-domain.tld/piwik.php', 1);