# react-native-game-analytics

> React-Native GameAnalytics package in pure js

Latest version **0.1.1** (published 2019-08-17) · (MIT AND Apache-2.0) license · 0 weekly downloads

## Install

```sh
npm install react-native-game-analytics
pnpm add react-native-game-analytics
yarn add react-native-game-analytics
bun add react-native-game-analytics
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2019-08-17 |
| First published | 2019-08-17 |
| Weekly downloads | 0 |
| License | (MIT AND Apache-2.0) |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 175.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Maintainers | barghi |
| Keywords | analytics, game, react-native |

## Links

- npm: https://www.npmjs.com/package/react-native-game-analytics
- Repository: https://github.com/BazamBazi/react-native-game-analytics
- Homepage: https://github.com/BazamBazi/react-native-game-analytics#README
- Issues: https://github.com/BazamBazi/react-native-game-analytics/issues
- npm.io page: https://npm.io/package/react-native-game-analytics

## Recent versions

- 0.1.1 (latest) — 2019-08-17
- 0.1.0 — 2019-08-17

## README

# react-native-game-analytics
[![npm](https://img.shields.io/npm/v/gameanalytics.svg)](https://www.npmjs.com/package/gameanalytics)
[![npm](https://img.shields.io/npm/dt/gameanalytics.svg?label=npm%20downloads)](https://www.npmjs.com/package/gameanalytics)
[![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)


Unofficial repository for GameAnalytics react-native SDK based on GA-SDK-JAVASCRIPT v3.0.3

GA-SDK-JAVASCRIPT Documentation can be found [here](https://gameanalytics.com/docs/javascript-sdk).

## Getting started

`$ npm install react-native-game-analytics --save`

### Mostly automatic installation

`$ react-native link react-native-game-analytics`

### Manual installation


#### iOS

1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
2. Go to `node_modules` ➜ `react-native-game-analytics` and add `RNGameAnalytics.xcodeproj`
3. In XCode, in the project navigator, select your project. Add `libRNGameAnalytics.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
4. Run your project (`Cmd+R`)<

#### Android

1. Open up `android/app/src/main/java/[...]/MainActivity.java`
  - Add `import com.bazambazi.gameanalytics.RNGameAnalyticsPackage;` to the imports at the top of the file
  - Add `new RNGameAnalyticsPackage()` to the list returned by the `getPackages()` method
2. Append the following lines to `android/settings.gradle`:
  	```
  	include ':react-native-game-analytics'
  	project(':react-native-game-analytics').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-game-analytics/android')
  	```
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
  	```
      compile project(':react-native-game-analytics')
  	```


## Usage
```javascript
import RNGameAnalytics from 'react-native-game-analytics';

// TODO: What to do with the module?
RNGameAnalytics;
```

---
_Source: https://npm.io/package/react-native-game-analytics · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
