@appmetrica/react-native-analytics
v3.3.0
Published
React Native plugin for AppMetrica analytics tool
Downloads
1,444
Readme
@appmetrica/react-native-analytics
React Native bridge to the AppMetrica on both iOS and Android.
Installation
npm install @appmetrica/react-native-analytics
Usage
import AppMetrica from '@appmetrica/react-native-analytics';
// Starts the statistics collection process.
AppMetrica.activateWithConfig({
apiKey: '...KEY...',
sessionTimeout: 120,
firstActivationAsUpdate: false,
});
// Sends a custom event message and additional parameters (optional).
AppMetrica.reportEvent('My event');
AppMetrica.reportEvent('My event', {foo: 'bar'});
// Send a custom error event.
AppMetrica.reportError('My error');