Setup piwik on a react native app

Hello,
We are trying to setup Piwik on a React Native app. We use React Native version 0.72.4.
We followed the instructions provided here:
Piwik PRO SDK for React Native — Piwik PRO Analytics Suite 18.1 documentation
related to this repository:
GitHub - PiwikPRO/react-native-piwik-pro-sdk: Piwik PRO SDK for React Native
We tried the following code (put here in a convenient way to read)

import PiwikProSdk from "@piwikpro/react-native-piwik-pro-sdk";
// Within an async function:
await PiwikProSdk.init('https://xxxx.containers.piwik.pro', '<token found on xxx.piwik.pro>');
await PiwikProSdk.trackScreen('test_screen_path')
//
// Also tried the above with:
await PiwikProSdk.setDispatchInterval(0);   
// Or even:
await PiwikProSdk.setDispatchInterval(-1);
await PiwikProSdk.dispatch();

Nothing shows up in the tracker debugger. We don’t see any error feedback. Apparently no http request is made at all. It seems Piwik doesn’t provide a REST API for doing the same, so this looks like using the SDK is the only way.
Could you please help us solving this

Hi @Lisa_Csatho,

Welcome to our community!

Instead of:

await PiwikProSdk.init('https://xxxx.containers.piwik.pro', '<token found on xxx.piwik.pro>');

It should be:

`await PiwikProSdk.init('https://xxxx.piwik.pro', '<token found on xxx.piwik.pro>');`

(not xxxx.containers.piwik.pro but xxxx.piwik.pro)

Best,
Oliwer