Skip to main content

Kochava

With our Kochava integration you can:

  • Accurately track subscriptions generated from Kochava campaigns, allowing you to know precisely how much revenue your campaigns generate.
  • Send trial conversions and renewals directly from RevenueCat to Kochava, allowing for tracking without an app open.
  • Continue to follow your cohorts for months to know the long tail revenue generated by your campaigns.

Integration at a Glance

Includes RevenueSupports Negative RevenueSends Sandbox EventsIncludes Customer AttributesSends Transfer EventsOptional Event Types
Requires Sandbox App GUIDCertain Reserved Attributes onlynon_subscription_purchase_event expiration_event billing_issue_event product_change_event

1. Install Kochava SDK

Before RevenueCat can integrate with Kochava, your app should be running the latest Kochava SDK. Refer to the Kochava developer documentation for the latest installation instructions.

2. Send device data to RevenueCat

The Kochava integration requires some device-specific data. RevenueCat will only send events into Kochava if the below Customer Attributes keys have been set for the device.

⚠️Minimum required SDK versions

$kochavaDeviceId and $deviceVersion are supported on versions 5.4.0+ of the iOS SDK, and 8.8.0+ of the Android SDK. Support in other SDKs is coming soon.

KeyDescriptionRequired
$kochavaDeviceIdThe unique Kochava Device ID.✅ (required)
$ipThe IP address of the device. This is gathered server-side when $ip is set to true.✅ (required)
$deviceVersionDevice, platform and version information. This is gathered server-side when $deviceVersion is set to true.✅ (required)
$idfaiOS advertising identifier UUID✅ (recommended)
$gpsAdIdGoogle advertising identifier✅ (recommended)
$idfviOS vender identifier UUID✅ (recommended)

When calling the setKochavaDeviceId() helper, all of the required customer attributes will be automatically set. Alternatively, these properties can be set manually, like any other Attributes.

//..
Purchases.configure(this, "public_sdk_key")
//..

// Set the KochavaDeviceID
Tracker.getInstance().retrieveDeviceId { deviceId ->
Purchases.sharedInstance.setKochavaDeviceID(deviceId);
}

You should make sure to set attributes after the Purchases SDK is configured, and before the first purchase occurs. It's safe to set attributes multiple times, as only the new/updated values will be sent to RevenueCat.

❗️Device identifiers with iOS App Tracking Transparency (iOS 14.5+)

If you are requesting the App Tracking permission through ATT to access the IDFA, you can call .collectDeviceIdentifiers() if the customer accepts the permission to update the $idfa attribute in RevenueCat.

📘Import AdSupport Framework (iOS)

The AdSupport framework is required to access the IDFA parameter on iOS. Don't forget to import this into your project.

❗️Remove any client-side purchase tracking

Make sure to remove all client-side tracking of revenue. Since RevenueCat will be sending events for all revenue actions, tracking purchases with the Kochava SDK directly can lead to double counting of revenue in Kochava.

(Optional) Send campaign data to RevenueCat

RevenueCat itself is not an attribution network, and can't determine which specific ad drove an install/conversion. However, if you're able to collect this information from another source, such as Kochava, it's possible to attach it to a Customer in RevenueCat using Attributes as well. The below reserved key names can be used to optionally attach campaign data to a user. This data will then be sent through to other downstream analytics integrations and accessible via APIs and webhooks.

Key
$mediaSource
$campaign
$adGroup
$ad
$keyword
$creative

3. Send RevenueCat events into Kochava

After you've set up the Purchases SDK to send attribution data from Kochava to RevenueCat, you can "turn on" the integration and configure the event names from the RevenueCat dashboard.

  1. Navigate to your project in the RevenueCat dashboard and find the Integrations card in the left menu. Select + New

  1. Choose Kochava from the Integrations menu.
  2. Add your API key, which can be generated in Kochava. For more information on how to access your API key, see the following documentation.
  3. If strict authentication rules are enabled in the integration, you can add a Secret API Key. Kochava does not enable this by default. There is currently no place in the UI to access your API Secret, so you need to request it from the Kochava support team.
  4. At least one App GUID or Test App GUID must be added. This is called APP GUID in the Kochava backend. If you perform Sanbox Testing, we automatically send events to the corresponding Test App GUID. For example, if you are testing on Android, we will automatically send events linked to the Android Test App GUID.
  5. Enter the event names that RevenueCat will send. The default names are our best attempt at mapping to Kochava event names. NOTE: You may lose some functionality if you do not use the default names. See this Full List of Standard Events that Kochava supports.
  6. Select whether you want sales reported as gross revenue (before app store commission) or after store commission and/or estimated taxes.

Kochava Integration

4. Testing the Kochava integration

You can test the Kochava integration end-to-end before going live. It's recommended that you test the integration is working properly for new users, and any existing users that may update their app to a new version.

Add a Test App GUID in the RevenueCat dashboard

Before you test the integration, make sure you have a Test App GUID set, either for iOS or Android. This is required if you want the integration to trigger for sandbox purchases.

Make a sandbox purchase with a new user

Simulate a new user installing your app, and go through your app flow to complete a sandbox purchase.

Check that the required device data is collected

Navigate the the Customer View for the test user that just made a purchase. Make sure that all of the required data from step 1 above is listed as attributes for the user.

Check that the Kochava event delivered successfully

While still on the Customer View, click into the test purchase event in the Customer History and make sure that the Kochava integration event exists and was delivered successfully.

👍You've done it!

You should start seeing events from RevenueCat appear in Kochava.