KochavaTracker (Adobe Air)
A lightweight and easy to integrate SDK written in ActionScript 3 that wraps the native Android and iOS SDKs, providing first-class integration with Kochava’s installation attribution and analytics platform.
- Android API 14
- Xcode 8.0
- Adobe AIR – 18.0 or higher
- Add the SDK into your project.
This includes Google Mobile (Play) Services bundled for you and does not require you to manually add Google Mobile Services to be able to perform attribution based on the Android Advertising Identifier.
If you are already using Google Mobile Services in your app, you can use this variant instead which does not have Google Mobile Services bundled. For Play Services version 15 and up ensure you include “play-services-ads-identifier” and its dependencies which at this time includes “play-services-basement”. When using a previous version of Google Play Services include “play-services-base” and “play-services-basement”.
- Create a new Android or iOS project.
- Choose File>Publish Settings.
- Select the wrench icon next to Script for ActionScript Settings.
- Select the Library Path tab.
- Click Browse for Native Extension (ANE) File and select the com.kochava.extensions.Kochava.ane file.
- Click OK.
- Select the wrench icon next to Target for Player Settings.
- Select the Permissions tab, and enable:
- Check the Manually manage permissions and manifest additions for this app box.
- Click OK.
- Go to Project Properties.
- Select Native Extensions under Actionscript Build Path.
- Choose Add ANE… and navigate to the com.kochava.extensions.Kochava.ane file.
- Select Actionscript Build Packaging > Google Android (or iOS if building for that target).
- Select the Native Extensions tab, and click the Package checkbox next to the extension.
Update Application Descriptor:
For Kochava to work, changes are required to the application XML file for the app. Modify the XML file created by your IDE with the following changes:
- Set your AIR SDK to 18.0 or higher in the app descriptor file.
- Include a link to the extension in the descriptor.
- Update your Android Manifest Additions in the XML element.
123456789101112131415161718<android><manifestAdditions><![CDATA[<manifest android:installLocation="auto"><uses-permission android:name="android.permission.INTERNET" /><uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /><uses-sdk android:minSdkVersion="14" android:targetSdkVersion="25"/><application><meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /><receiver android:name="com.kochava.base.ReferralReceiver" android:exported="true"><intent-filter><action android:name="com.android.vending.INSTALL_REFERRER" /></intent-filter></receiver></application></manifest>]]></manifestAdditions></android>
- Configure a Tracker
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.1234567import com.kochava.nativeextensions.*;import com.kochava.nativeextensions.events.*;//…var configMapObject:Object = new Object();configMapObject[KochavaTracker.PARAM_IOS_APP_GUID_STRING_KEY] = "_YOUR_IOS_APP_GUID_";configMapObject[KochavaTracker.PARAM_ANDROID_APP_GUID_STRING_KEY] = "_YOUR_ANDROID_APP_GUID_";KochavaTracker.configure(configMapObject);
Using the SDK
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.
var infoMapObject:Object = new Object();
infoMapObject["name"] = 'Gold Token';
infoMapObject["price"] = 1.99;
infoMapObject["currency"] = 'USD';
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.
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 configure Intelligent Consent Management. For code-level integration see the configuration parameter Intelligent Consent Management.
Additional features and usage details are available in the reference.