Support Home > Server-to-Server Integration > RevenueCat Integration

RevenueCat Integration

RevenueCat is a third-party company that provides subscription tracking services for developers. Kochava is integrated as an available MMP (Mobile Measurement Partner) for RevenueCat customers, allowing them to send revenue events in a server-to-server capacity.

Once integration is complete customers 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.

Integrate the Kochava SDK

Before RevenueCat can integrate with Kochava, your app should be running the latest Kochava SDK. Refer to our latest SDK support documentation.


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.

 

SDK Version Note: iOS 5.4.0+ and Android 8.8.0+ are required for supporting $kochavaDeviceId and $deviceVersion.

 

KeyDescriptionRequired
$kochavaDeviceIdThe unique Kochava Device ID.
$ipThe IP address of the device. This is gathered server-side when $ip is set to true.
$deviceVersionDevice, platform and version information. This is gathered server-side when $deviceVersion is set to true.
$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.

 

Kotlin

//..
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 is safe to set attributes multiple times, as only the new/updated values will be sent to RevenueCat.

 

WARNING: For device identifies 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 grants permission to update the $idfa attribute in RevenueCat.

 

Alerting Interface

 

WARNING: 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.


Send Campaign Data to RevenueCat (optional):

RevenueCat itself is not an attribution network, and can’t determine which specific ad drove an install/conversion. However, if you are 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.

Keys —

  • $mediaSource
  • $campaign
  • $adGroup
  • $ad
  • $keyword
  • $creative

Send RevenueCat Events into Kochava

After you have 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. Click + New.
  2.  

    Alerting Interface

     

  3. Select Kochava from the Integrations menu.
  4. Add your API key, which can be generated in Kochava. For more information on how to access your API key, refer to our support documentation.
  5. 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, contact your Kochava Client Success Management team for more information.
  6. 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.
  7. Enter the event names that RevenueCat will send. The default names are our best attempt at mapping to Kochava event names.
  8. NOTE: You may lose some functionality if you do not use the default names. Refer to our support documentation for a full list of standard events.

     

  9. Select whether you want sales reported as gross revenue (before app store commission) or after store commission and/or estimated taxes.
  10.  

    Alerting Interface


Testing the Kochava Integration

You can test the Kochava integration end-to-end before going live. It is 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 to 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.

 

Alerting Interface

 

Verify 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.

 

Alerting Interface

 
 
Last Modified: Oct 11, 2024 at 9:12 am