https://github.com/appmetrica/appmetrica-react-native-plugin
AppMetrica Plugin for React Native
https://github.com/appmetrica/appmetrica-react-native-plugin
analytics android appmetrica crashes ios react-native react-native-plugin
Last synced: 4 months ago
JSON representation
AppMetrica Plugin for React Native
- Host: GitHub
- URL: https://github.com/appmetrica/appmetrica-react-native-plugin
- Owner: appmetrica
- License: mit
- Created: 2024-05-08T07:56:27.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2026-01-21T09:17:03.000Z (5 months ago)
- Last Synced: 2026-01-21T21:35:25.505Z (5 months ago)
- Topics: analytics, android, appmetrica, crashes, ios, react-native, react-native-plugin
- Language: Java
- Homepage: https://appmetrica.io
- Size: 336 KB
- Stars: 11
- Watchers: 4
- Forks: 4
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# @appmetrica/react-native-analytics
React Native bridge to the [AppMetrica](https://appmetrica.io) on both iOS and Android.
## Installation
```sh
npm install @appmetrica/react-native-analytics
```
## Usage
```js
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');
```