KochavaTracker – Methods

KochavaTracker Unity

Methods

Configuration

Kochava App GUID:

Your Kochava App GUID(s) can be found in your dashboard at Kochava.com and should be different for each platform. If using the UI configuration you can simply enter each platform’s app GUID into the appropriate platform-specific slot (the Unity Editor slot will be used by default). If using code it is your responsibility to determine which app GUID to use by platform.

 

UI Configuration –

 

Code Configuration –


Log Level:

When enabled, the Kochava SDK will provide varying levels of diagnostic information within your target platform’s logging environment. Supported log levels include none, error, warn, info, debug and trace. Logging should always be set to none for production builds.

For a list of logging output locations by platform refer to: https://docs.unity3d.com/Manual/LogFiles.html

 

UI Configuration –

 

Code Configuration –


Partner Name:

Reserved, may be provided by your Client Success Managers.

 

UI Configuration –

 

Code Configuration –


App Limit Ad Tracking:

If you wish to limit ad tracking at the application level, with respect to Kochava conversions, you can turn off ad tracking (true) for the purpose of changing the limit ad tracking state. By default, limit ad tracking is set to off (false), user opts-in to advertising. This can be set before initialization through the UI or config object, and after initialization through a setter method.

 

UI Configuration –

 

Code Configuration –


Request Attribution Callback:

Attribution data can be received from Kochava’s servers, usually in less than ten seconds from the initial application launch. This is only required if you wish to do something with the attribution data from the server within your app; it is not required for attribution to work properly server-side.

NOTE: Unless you have a specific need within your app to read attribution data you do not need implement this feature.

 

UI Configuration –

 

You can use the Unity Event setter to add one or more recipients of the attribution callback. When picking a function choose “Dynamic String” to ensure the attribution value can be passed through properly, and ensure the script is attached to a GameObject that survives scene changes.

 

Code Configuration –

 

Requesting attribution also requires that you provide a listener to receive the attribution data within code. This can be set anywhere within the first few seconds of launch.

 

For a detailed explanation of attribution responses, refer to our Attribution Response Examples support documentation.


Intelligent Consent Management:

Enables Kochava Intelligent Consent Management. This must be enabled both here and on the Kochava Dashboard in order to function.

Refer to our Intelligent Consent Management support documentation for more information for further details on the use.

 

NOTE: Intelligent Consent Management is currently supported only on iOS and Android devices. Other platforms, including ICM functionality within the Unity Player, will be added in a future release.

 

UI Configuration –

 

You can use the Unity Event setter to add one or more recipients of the consent status change callback. When picking a function ensure the script is attached to a GameObject that survives scene changes.

 

Code Configuration –

 

Enabling Intelligent Consent Management also requires that you provide a listener to receive the change notifications data within code. This must be set immediately following initialization.


Sending Post-Install Events

Post-Install events can be instrumented using either standard or custom parameters to track the behavior of your users. No event pre-registration is required. Post-Install events can only be triggered after Kochava has initialized. If using the configuration object Kochava will be initialized during Awake() and you can begin to send events within Start().

 

NOTE: Event names may not be prepended with an underscore, as that convention is reserved for Kochava system events. (i.e., _INSTALL)

 

Sending a Standard Event:

Standard events use common parameters and may be sent using the Kochava.SendEvent(Event) method. Choose an event type and any parameters you wish to create your event.


Sending a Custom Event:

Custom events provide you with full control over your event parameters and should only be used if your event parameters do not conform to the list of available standard parameters. Use the Kochava.SendEvent(eventName) or Kochava.SendEvent(eventName, eventData) methods to send a custom event. You may optionally send a stringified dictionary within the eventData parameter.


Sending In App Purchase Receipts:

Purchase receipts from Google Play and iOS app stores can be sent with your standard events by using the platform-specific setter within the Event object.


Setting an Identity Link:

Identity Link events provide the opportunity to tie a Kochava device ID to your internal identifier.

 

USE CASE: You may have assigned each user of your app an internal userid which you want to connect to a user’s service identifier. Using the SetIdentityLink() method, you can send both your internal id with a device identifier and connect them in the Kochava database.

 

Identity links should be set immediately after Kochava initialization when possible so that any identity link information will be sent with the install and be associated with any install postbacks.


Sending Deep Link:

Kochava offers this method for a convenient way to track your deep links. After receiving the URI, you can pass it along with your namespace to the deep link method. In iOS only, you may optionally pass the calling application.


Set App Limit Ad Tracking:

If you wish to limit ad tracking at the application level, with respect to Kochava conversions, you can turn off ad tracking (true) for the purpose of changing the limit ad tracking state. By default, limit ad tracking is set to off (false), user opts-in to advertising. This can be set before initialization through the config object or after initialization with the following method.


Get your Kochava Device ID:

This method returns the Kochava Device ID.


Get your Attribution Data:

If you have chosen to retrieve attribution, this method will return the last received attribution data string.

 

NOTE: Attribution takes up to ten seconds to be retrieved the first time.

 

Calling this method before then will return an empty string.


Get SDK Version:

This method returns the SDK version.


Add Push Token:

Requires the Push feature to be enabled on the Kochava Dashboard. This method adds a new push token for this user. This should be called any time it is detected that the push token changes.


Remove Push Token:

Requires the Push feature to be enabled on the Kochava Dashboard. This method adds a removes an existing push token for this user. This should be called to disable push message functionality for this user.


Get Consent Required:

Returns if consent is currently required for this user. Consent requirements are determined by a server handshake and are updated on a regular basis. Any time that required changes the Consent Status Change Handler will be called.

Prior to the first server handshake consent is considered to be required. The app should operate under that assumption until the callback indicates a change has occurred and consent may or may not actually be required.


Set Consent Granted:

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

See setConsentPrompted() to indicate that the user was shown the consent prompt.

If consent is not required then you should not prompt the user or call this method.


Get Consent Granted:

Returns if consent is currently granted. Consent is considered not granted until specifically granted by the user and set with setConsentGranted(boolean).

Previously granted consent may be invalidated at any time by an addition to the partner list or a change to the prompt ID. This will be indicated with a call to the Consent Status Change Handler.

 

NOTE: Consent granted is only required if isConsentRequired() is true.


Get Consent Response Time:

Returns when consent was either granted or declined. If consent is currently unknown either initially or after a previously granted consent was invalidated this will return 0.


Get Consent Should Prompt:

Returns if the host app should prompt the user for consent. After prompting call setConsentPrompted() to clear the should prompt flag.

If the user then gives an explicit granted or declined response indicate it with setConsentGranted(boolean).


Set Consent Prompted:

Clears the consent should prompt flag. Call this to indicate the user is being prompted for consent.

This should be called when the prompt is shown to ensure the should prompt flag is cleared and the retry timer is started for the next prompt if they do not grant.


Get Consent Partners JSON:

Returns the list of consent partners as configured on the Kochava dashboard. If unavailable this will return an empty JSON array.


Get Consent Description:

Returns the consent description.
If unavailable this will return an empty string.

 
 

Last Modified: Jun 21, 2018 at 2:02 pm