Support Home > SDK Integration > SDK – KochavaTracker Android

SDK – KochavaTracker Android


KochavaTracker Android

A lightweight and easy to integrate SDK written in Java, providing first-class integration with Kochava’s installation attribution and analytics platform.



  • Android
  • Android TV
  • Android Wear
  • Android Auto
  • Android Instant App
  • Google Daydream VR
  • Samsung Gear VR
  • Amazon Fire



  • Android API 14
  • Internet Permission
  • Google Play Services Base Library (if publishing on the Google Play Store)
  • Google Install Referrer Library (if publishing on the Google Play Store)


  1. Add the SDK into your project.


    You have the option of downloading the SDK either using Maven, or through the direct download of the AAR file.


    Using Maven:

    Add the Kochava Maven repository to your root-level build.gradle file.


    Add the Kochava SDK to your module level build.gradle file. Replace “x.y.z” with the version obtained from the Download Badge above.


    Direct Download:

    Download the AAR file from the Download Badge above and either add it directly or extract the JAR file and other resources from it and add them individually.


  2. Add Dependencies.
    Dependencies are added alongside the Kochava SDK in your module level 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.


  3. Add Permissions.
    Permissions are added to the top level of the AndroidManifest.xml file. Required and Recommended permissions are automatically added when using the AAR. 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.


  4. Broadcast Receiver.


    DEPRECATED: As of 3.3.0, because Google has introduced a new way of retrieving the Install Referrer. Add the install referrer library listed in dependencies to ensure collection with the new API. You should also continue using the broadcast receiver until Google completes the transition.


    The Kochava Tracker features an AAR included broadcast receiver that listens for the INSTALL_REFERRER broadcast action. If the Kochava Tracker broadcast receiver is the only receiver for that action in your app no further action is required. Otherwise refer to the ReferralReceiver reference for advanced configuration instructions.


  5. Configure a Tracker.
    To configure the Tracker, first create a Tracker.Configuration object, and then perform the configuration using the configuration method Tracker.configure(com.kochava.base.Tracker.Configuration). It is recommended that you call this in your Application.onCreate method.


    NOTE: If you are doing an advanced configuration such as in a multiple process app then read the advanced usage section in Tracker.Configuration.

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 Tracker.Event.


Setting Identity Link:

You can link additional identifying information with an install, where it can be integrated with your analytics. For more information see Tracker.setIdentityLink(com.kochava.base.Tracker.IdentityLink).


Getting Attribution:

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


Getting the Device ID:

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


Adjusting the Log Level:

You can specify the types of entries which the tracker prints to the log. For more information see Tracker.LogLevel.


Push Notifications:

If the desired app has been configured to use the Kochava Push Notification service, you can use the SDK to send push tokens and push open events. For more information refer to our Push Notifications support documentation.


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 Tracker.Configuration.setIntelligentConsentManagement(boolean).


For detailed information about the available classes and their associated resources, see documents below.


Tracker entry point.


Tracker Configuration Builder.


Event Builder.


Identity Link Builder.


Tracker Event types.


Tracker Logging Levels.


DEPRECATED: Tracker Attribution listener.


Tracker Attribution Update listener.


Install Referrer Receiver.


Install Referrer


Install Referrer status messages.


Intelligent Consent Management Status Change Listener.


Intelligent Consent Management Partner Details.


DeepLink and Deferred DeepLink Listener.


Last Modified: Jun 6, 2018 at 10:10 am