KochavaTracker – Methods

KochavaTracker ReactNative


All methods are a wrapper over the native iOS, Android, and Windows SDKs. The reference documentation for those platforms is available for more details.

iOS Reference: https://support.kochava.com/sdk-integration/ios-sdk-integration/
Android Reference: https://support.kochava.com/sdk-integration/android-sdk-integration/
Windows Reference: https://support.kochava.com/sdk-integration/windows-sdk-integration


The KochavaTracker must be configured before it can be used. Call this method to perform the configuration.


Config Parameters:


App Guid used on the Android platform. Required if building for Android.



App Guid used on the iOS platform. Required if building for iOS.



App Guid used on the Windows platform. Required if building for Windows.



Sets if app level advertising tracking should be limited. This is unrelated to the operating system limit ad tracking flag that is already accounted for by the SDK.



Sets a user identity link that is used for linking based off of external criteria such as a username.



Sets the log level for the Tracker from one of the following:




Attribution information is processed and stored within Kochava’s Servers, where it is reported back to you through your Kochava account. You may also retrieve this information from within your app by setting the retrieve attribution boolean to true.



Enables Kochava Intelligent Consent Management. This must be enabled both here and on the Kochava Dashboard in order to function. See Intelligent Consent Management for more information on how to use Intelligent Consent Management.

Attribution Event Listener

Attribution information is processed and stored within Kochava’s Servers, where it is reported back to you through your Kochava account. You may also retrieve this information from within your app. Note that this should only be done if your app makes use of this information, otherwise it causes needless network communication.

NOTE: The behavior of this callback is different depending on the platform. For Android and iOS this is called only when the SDK first retrieves the attribution information or if it has changed. For Windows this will be called once per launch with the latest attribution information even if it has not changed.

To retrieve attribution information in app you must pass the PARAM_RETRIEVE_ATTRIBUTION_BOOL_KEY parameter with a value of true during configuration and add the event listener as follows prior to configuring the KochavaTracker.

Consent Status Change Listener

To retrieve consent status change events you must first have enabled Intelligent Consent Management during configuration. To ensure no changes are missed this should be set immediately following configuration.

This is called any time the SDK detects the consent status has changed. This includes when consent requirements are first determined, if required status changes, if a partner is added, if prompt ID invalidation occurs, or if the prompt retry interval expires.

This may be called multiple times while the app is running if a change has been observed. These typically occur, but are not limited to, during an app launch or on the app coming to the foreground.

sendEventString(nameString, infoString)

Sends an event with a name and info string.

sendEventMapObject(nameString, infoMapObject)

Sends an event with a name and info map object. See the Kochava Standard Event List for event names and parameters that can be used for consistent reporting. You may also use any custom event name or parameters as desired.

sendEventAppleAppStoreReceipt(nameString, mapObject, appStoreReceiptBase64EncodedString)

Sends an apple app store receipt (iOS only). Additional data may be sent using a map object.

sendEventGooglePlayReceipt(nameString, mapObject, receiptData, receiptDataSignature)

Sends a google play store receipt (Android only). Additional data may be sent using a map object.

sendDeepLink(openURLString, sourceApplicationString)

Sends a deep link event to Kochava, along with the associated opening URL and source application string. The second parameter is used only on iOS.


Sets a boolean switch which indicates whether a user of the app wants to limit advertising tracking.


Sends identity information to Kochava, where it can be integrated into your Analytics.


Gets the attribution map object that has already been retrieved by the tracker from the Kochava Server.


Gets the device identification string used by the tracker.


Gets the KochavaTracker version. This is a combination of the Native SDK and the wrapper version.


Adds a push token (Android and iOS only).


Removes a push token (Android and iOS only).


Sets the user’s response to the consent prompt. If they dismiss the dialog or otherwise do not answer then do not call this method.


Indicates that the user was prompted for consent.


Gets the consent status. Sample code is provided showing how to access all the items contained within the consent json object.


Last Modified: Oct 17, 2018 at 2:05 pm