Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 669 Bytes

README.md

File metadata and controls

29 lines (21 loc) · 669 Bytes

@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');