AppsFlyer - Kahuna Integration

Integration Overview

Kahuna is a pioneer in communication automation, dedicated to empowering businesses to grow and thrive in the mobile era. We enable a new level of authentic engagement between brands and their customers wherever they are — the web, email, mobile, social channels — through personalized communication at scale. Powered by big data and machine learning, we help create delightful experiences for every customer with the perfect message, delivered on the right channel, at just the right time. 

Follow the instructions below to configure the integration with Kahuna:

1.  Minimum requirements - AppsFlyer SDK:

  • Android – version 2.3.1.18 and above
  • iOS – version 3.3.3 and above 

2.  Integrating with Kahuna requires that the Kahuna Device ID (Kahuna’s unique user identifier) is populated in AppsFlyer's SDK. This parameter is sent with every postback and enables the identification of each user. To perform this you must insert the following strings to your app code: 

IMPORTANT NOTE:

Make sure the lines of code are inserted at the correct place – after Kahuna SDK was launched and before the appsflyer.sendtracking (Android) / trackAppLaunch (iOS) methods are called.

For Android:

HashMap<String, Object> customData = new HashMap<String,Object>();
String deviceId = Kahuna.getInstance().getKahunaDeviceId();
customData .put("customData", deviceId);
AppsFlyerLib.setAdditionalData(customData);

For iOS:

NSString  *kahunaDeviceID = [Kahuna getKahunaDeviceId];
[[AppsFlyerTracker sharedTracker] setAdditionalData:@{@"customData" : kahunaDeviceID}];

3.  Get the Kahuna secret key: 

  • Login to your Kahuna account
  • Click the user icon and Select Settings on the right-hand corner of dashboard menu

  • Copy the Kahuna secret key:

4.  Select APIs & Integrations– on this page you can find the parameters:

5.  Configure Kahuna in AppsFlyer’s Dashboard. 

  • Click Integrated Partners in the left of the screen

  • Search for Kahuna:

 

  • Click on the Kahuna logo to open the configuration window

  • Under Integration Parameters, select the Enable box
  • Insert the Kahuna Master Key and taken from Kahuna console (see Section 3)
  • If you want to send the events to Kahuna’s Sandbox environment insert the letter S in the Staging box (see “Testing with Kahuna Sandbox”)
  • For the Production environment insert the letter P in the production
  • If you insert both, the events are sent to production
  • Click Save & Close

Once you have saved the configuration, AppsFlyer sends the following data to Kahuna for every organic and non-organic install:

  • Kahuna Dev_ID
  • Media Source
  • Country code
  • OS Version

IMPORTANT NOTE:

According to Facebook and Twitter T&C, we are unable share user level data with any 3rd party. As a result, all Facebook and Twitter installs are sent to Kahuna as organic. 

View User Attribution Data in Kahuna

The install events can be viewed as Newbies in Kahuna's main dashboard.

You can search for a specific user or go to “Top People” in your left side navigation.

Selecting one of the users opens the Mini Profile where you can see the install event “af_install” in the Top Events section:

Testing with Sandbox

If you haven’t released your app to the app store yet and want to test the integration from Kahuna’s Sandbox environment, follow these steps: 

1.  Make sure you enter “s” in the Staging Textbox when configuring Kahuna within Appsflyer

2.  Make sure you have added the code to your App to integrate Appsflyer and Kahuna SDKs as described in the above sections

3.  You must obtain the Advertising ID from your test device (you can find the Advertising ID by installing the app on your device and looking at the logs)

4.  Ask Appsflyer to whitelist your Advertising ID

5.  Uninstall the app from your device

6.  Configure this URL with your data (app package name, advertising ID, and campaign name...don’t include the brackets) - https://app.appsflyer.com/[APP PACKAGE NAME]?pid=[SOMETHING]&advertising_id=[DEVICE’S ADVERTISING ID]

7.  Go to that URL, you may see this:

8.  Install the App on your device

9.  Go to Kahuna’s dashboard and search for the user (you can enable Kahuna debugging and look at the logs to get the Kahuna unique device ID for that user.. “dev_id”... or if your app requires log-in and you pass credentials to Kahuna, then you can search by that credential also). Once you find the user, you should see an “af_install” event for that user.

 

Was this article helpful?
0 out of 0 found this helpful