Skip to content

Fork of original library with removed Metrica dependency from Podspec

Notifications You must be signed in to change notification settings

nikenvy/react-native-appmetrica

 
 

Repository files navigation

react-native-appmetrica

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

Installation

yarn add https://github.com/nikenvy/react-native-appmetrica

add to Podile

  pod 'react-native-appmetrica-yandex', :path => '../node_modules/react-native-appmetrica-yandex'

Usage

import { YandexMetrica } from 'react-native-appmetrica-yandex';

// Initialize
YandexMetrica.activateWithApiKey('KEY');

// OR
YandexMetrica.activateWithConfig({
  apiKey: 'KEY',
  sessionTimeout: 120,
  firstActivationAsUpdate: true,
});


YandexMetrica.setUserProfileID('12345');

YandexMetrica.setUserProfileAttributes({ ... })

// Sends a custom event message and additional parameters (optional).
YandexMetrica.reportEvent('My event');
YandexMetrica.reportEvent('My event', 'Test');
YandexMetrica.reportEvent('My event', { foo: 'bar' });

// Send a custom error event and additional parameters (optional).
YandexMetrica.reportError('My error');
YandexMetrica.reportError('My error', 'Test');
YandexMetrica.reportError('My error', { foo: 'bar' });
YandexMetrica.reportError('My error', new Error('test'));


// Send a custom report app open via deeplink.
YandexMetrica.reportAppOpen(deeplink);

About

Fork of original library with removed Metrica dependency from Podspec

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 54.8%
  • Objective-C 30.4%
  • JavaScript 10.9%
  • Ruby 3.9%