@npm_redstart/react-native-appmetrica
TypeScript icon, indicating that this package has built-in type declarations

2.3.0 • Public • Published

react-native-appmetrica

React Native bridge to the AppMetrica on both iOS and Android.

Installation

  1. npm install react-native-appmetrica --save
  2. If React Native version <= 0.59:
    react-native link react-native-appmetrica
  3. iOS only
  • if ${PROJECT_DIR}/ios/Podfile exists:
    npx pod-install
  • if ${PROJECT_DIR}/ios/Podfile don't exists:
    Setup AppMetrica and placed frameworks at ${PROJECT_DIR}/ios/Frameworks

Usage

import AppMetrica from 'react-native-appmetrica';

// Starts the statistics collection process.
AppMetrica.activate({
  apiKey: '...KEY...',
  sessionTimeout: 120,
  firstActivationAsUpdate: true,
});

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

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @npm_redstart/react-native-appmetrica

      Weekly Downloads

      31

      Version

      2.3.0

      License

      MIT

      Unpacked Size

      124 kB

      Total Files

      24

      Last publish

      Collaborators

      • aleksey_funt
      • pogodaevmatvey
      • hadukae
      • ademkovich