1. Overview

The plugin is located at npmjs repositories (npm repositories)
This plugin is built for:

  • Mobigate SDK version 1.0.4

2. Adding SDK to the project

First, install library from the repository with

yarn add react-native-mobigate

or

npm install react-native-mobigate --save

Link newly added plugin

  • React Native >= 0.60
    Starting from React Native 0.60, autolinking makes the installation process simpler
  • React Native <= 0.59
    • Mostly automatic installation:
      react-native link react-native-mobigate
    • Manual installation:

3. Api methods

To use any method from the plugin add import:

import Mobigate from 'react-native-mobigate'

3.1 SDK initialization

You must initialize the library before running it. Use init(apiKey, options, onSuccess, onError) method for that:

Mobigate.init(apiKey, options, onSuccess, onError)

ParameterTypeDescription
apiKeyStringApi key provided by your business partner
optionsJson ObjectSDK configuration 
onSuccessFunctionreturns callback object
onErrorFunctionreturns callback object

When the library is already initialized run it. Use startSDK(onSuccess, onError) method for that:

Mobigate.startSDK(onSuccess, onError) 

ParameterTypeDescription
onSuccessFunctionreturns callback object
onErrorFunctionreturns callback object

3.2 Tracking in app events

In-App Events provide insight on what is happening in your app. It is recommended to take the time and define the events you would like to measure.

An event consists of two fields that you  can use to describe a user's interaction with your app content:

Field nameTypeRequiredDescription
CategoryString/EventCategoryyesEvent category
ParameterString/EventParameternoEvent parameter. 
There can be more than one

3.2.1 Overview

3.2.2 Implementation

3.2.3 Event categories

3.2.4 Event parameters

3.3 Remaining methods

NameTypeDefaultDescription
    

4. Constants

5. Sample app

Tags:
Created by Admin on 2019/12/30 10:45
Spicy Mobile
spicymobile.pl