Support Home > SDK Integration > SDK – KochavaTracker – ReactNative

SDK – KochavaTracker – ReactNative

SDK

KochavaTracker – ReactNative


A lightweight and easy to integrate SDK written in JavaScript that wraps the native Android, iOS, and Windows SDKs, providing first-class integration with Kochava’s installation attribution and analytics platform.

 

Platforms:

  • Android
  • iOS
  • Windows UWP

 

Requirements:

  • Android API 14
  • Xcode 9.0
  • Visual Studio 2017
  • ReactNative 0.48

Integration

  1. Add the SDK into your project.
    You have the option of downloading the SDK either through npm or as a direct download.
  2.  

    Using NPM:

    npm version

    1. Using a terminal navigate to the root directory of your ReactNative Project.
    2. Ensure your project contains at least one of Android, iOS, or Windows platforms supporting native code.
    3. Run the following commands.:

     

    Direct Download:

    1. Download the latest version from the Download Badge above to the root directory of your ReactNative Project.
    2. Using a terminal navigate to the root directory of your ReactNative Project.
    3. Ensure your project contains at least one of Android, iOS, or Windows platforms supporting native code.
    4. Run the following commands.

     

    Dependencies —

    Dependencies are added in your android/app/build.gradle file.

    NOTE: Starting with Play Services 15 the dependency requirements have changed. The Android Advertising ID (adid) collection has moved out of play-services “base” and into “ads-identifier”. Use the appropriate option for the version of Play Services you are using as indicated below.

     

    Permissions —

    Permissions are added to the top level of the AndroidManifest.xml file located in android/app/src/main. Required and Recommended permissions are automatically added by the library. If a recommended permission is unwanted it can be removed using the tools:node=”remove” feature.

    NOTE: Ensure you are compliant with the terms and requirements of the publishing app store regarding sensitive permissions such as GET_ACCOUNTS.

    Ensure your project is setup with Windows platform support and then follow the Manual Linking guide to link the Kochava SDK. The library and package names you would use are “RNKochavaTracker” and “RNKochavaTrackerPackage”.

     

  3. Configure a Tracker.
  4. To configure the Tracker, first create an object, and then set your App GUID per platform and add any additional configuration items into it before performing configuration by calling the configure method. This should be done in the logic of your application where things first start up.


Using the SDK

Sending Events:

More than basic analytics, the events you send to Kochava are associated with your install attribution data, so that you can understand how the users who came to you through a particular ad went on to use the various features within your app. For more information, refer to sendEventMapObject.


Setting Identity Link:

You can link additional identifying information with an install, where it can be integrated with your analytics. For more information see setIdentityLink.


Getting Attribution:

You can retrieve Kochava’s attribution information within your app. For more information see getAttribution.


Getting the Device ID:

You can get the unique device identifier used by the tracker. For more information see getDeviceId.


Adjusting the Log Level:

You can specify the types of entries which the tracker prints to the log. For more information see Configure Log Level Enum Values.


Intelligent Consent Management:

When intelligent consent management is enabled and configured within your Kochava dashboard, the SDK will indicate when the user should be prompted for consent. It will also not gather, persist, or transmit data which requires consent unless consent has been granted. For more information see Intelligent Consent Management. For code-level integration see the configuration parameter Intelligent Consent Management.


References

KochavaTracker ReactNative Methods

A list of methods available to send to the Kochava Server.

Post-Install Events

A list of the standard events that can be passed to Kochava.

 
 

Last Modified: Jul 17, 2018 at 10:35 am