Integrating the SDK
- Roku OS 9.2
- Roku SceneGraph Channel
- Roku TV
In order to use the Kochava SDK you must first add it to your project. This can be accomplished by downloading the SDK and copying it into your project directory.
- Download and unzip the Kochava Roku SDK to a known location.
- Copy the components/kochava directory into the components directory of your project.
- Copy the source/kochava directory into the source directory of your project.
- Import the KochavaSdk.brs script in your primary scene xml file.
<script type="text/brightscript" uri="pkg:/source/kochava/KochavaSdk.brs"/>
Starting the Tracker
Once you have added the Kochava SDK to your project, the next step is to configure and start the Kochava Tracker in code. Only your App GUID is required to start the tracker with the default settings, which is the case for typical integrations.
We recommend starting the tracker within the primary scene init function, although this can be done later if needed. Starting the tracker as early as possible will provide more accurate session reporting and help to ensure the tracker has been started before using it.
kochava = GetKochavaInstance() kochava.tracker.startWithAppGuid("_YOUR_APP_GUID_")
Confirm the Integration
After integrating the SDK and adding the code to start the tracker, launch and run the app for at least 10 seconds or more. During this time the tracker will start and send an install payload to Kochava. To confirm integration was successful, visit the app’s Install Feed Validation page Apps & Assets > Install Feed Validation. On this page you should see one of two integration messages, indicating integration success or failure.
Along with this message you will also see a variety of data points associated with the device used for testing. At this point your integration is successful and you can proceed to the next step(s).
NOTE: It may take a few minutes for the first install to appear within the Install Feed Validation page. If you do not see this message immediately, you may simply need to wait a few minutes and check again.
Integration Not Complete:
If you encounter this message, please review the integration steps, uninstall and reinstall the app, and check again.
Where to Go From Here:
Now that you have completed integration you are ready to utilize the many features offered by the Kochava SDK. Continue on to Using the SDK and choose a topic.
Custom Tracker Configuration
Below is a list of all configuration options and their default settings. Keep in mind that in a typical integration these configuration settings should not be adjusted from their default values.
Default — None
This string should be set to your Kochava App GUID, which can be found in your Edit App page within the Kochava dashboard. This value is always required (unless a Partner Name is set).
Default — Info
Set this value to the desired Log Level to be used by the SDK for debugging purposes. The log level should be set prior to starting the SDK, but can be changed at any time.
For complete details and examples, see: Enabling Logging
Default — None
This is a reserved setting and should not be set unless provided by your Client Success Manager.
Default — None
This is a reserved value and should not be set unless provided by your Client Success Manager.