Adobe Launch SDK extension

At a glance: Send data to Adobe Launch SDK and AppsFlyer SDK with the single implementation of AppsFlyer Adobe Launch SDK Extension.

Overview

The Adobe Launch SDK is an integral part of the Adobe Experience Platform. Adobe Experience Platform helps businesses gather, consolidate, and analyze data from multiple apps and platforms. It allows business owners and developers to better understand customer behavior in order to optimize experience and content delivery. If your app implements both the Adobe Launch SDK and the AppsFlyer SDK, you can send data to both with a single implementation of AppsFlyer Adobe Launch SDK Extension. It reduces the overall complexity of your development process and makes for a cleaner and maintainable codebase.

 Note

If you're using the Adobe Launch extension, there's no need for the standard Adobe Analytics integration.

Prerequisites

A few things are required before integrating AppsFlyer Adobe SDK Extension.

Get your AppsFlyer dev key

dev_key.png

  1. In your app's dashboard, click on App Settings under Configuration in the left-hand menu.
  2. Under SDK Installation, copy the Dev Key.

Get your app ID

  • For Android - the app ID is the package name, e.g. example.com.app.
  • For iOS - the app ID is the app's iTunes ID without the id prefix, e.g. 123456748.

Step 1: Configuring Adobe Launch

Follow the instructions here to configure Adobe Launch.

1.1 Creating a new property in Adobe Launch

  1. Log in to Adobe Experience Cloud.
  2. Select Launch.
  3. Click Go to Launch.
  4. Click New Property.
  5. Give the property a name and select Mobile.
  6. Click Save.

1.2 Installing required Adobe Launch extensions

Install the following extensions in Adobe Launch:

adboe_extensions.png

  • Adobe Analytics - connects the recorded data from the SDK to the Adobe Analytics module.
  • AppsFlyer SDK Extension - sends data and events to both Adobe and AppsFlyer using the Adobe Launch SDK.
  • Adobe Profile - allows the SDK to store data into a client-side profile.
  • Adobe Mobile Core - allows configuration of the mobile SDK and provides access to default lifecycle events and conditions.

Installing Adobe Analytics extension

  1. Log in to Adobe Analytics.
  2. Create a report suite.
  3. Log back into Adobe Launch.
  4. From the list of properties, click on the property that you created earlier.
  5. Click Extensions.
  6. Search for and install Adobe Analytics.
  7. Under Report Suites, specify the report suite that you created in step 2.
  8. Click Save.

Installing AppsFlyer SDK Extension

  1. Select Extensions again.
  2. Search for and install AppsFlyer SDK Extension.
  3. Under AppsFlyer iOS App ID, specify the iOS app ID that you got in the prerequisites step.
  4. Under AppsFlyer Dev Key specify the dev key that you got in the prerequisites step.
  5. Enable Send attribution data to Adobe Analytics. Note that there are some restrictions on sharing user-level data with 3rd-party analytics platforms.
  6. Click Save.

Install Profile and Mobile Core extension

  1. Select Extensions again.
  2. Search for and install Profile.
  3. Search for and install Mobile Core.
    • When installing Mobile Core, simply save the extension as is. There is no need to specify the Experience Cloud Server.

Step 2: Implementing AppsFlyer Adobe SDK Extension

Follow the instructions in this section to Implement the Adobe SDK Extension into your app.

2.1 Adding the SDK to the app

adobe_sdk.png

  1. Inside your Adobe property, select Environments.
  2. Select the environment for which you want to deploy the SDK.
  3. On the right-hand side, click the box icon.
  4. Copy the code snippets from the window that opens and follow the instructions. If you're the marketer configuring Adobe, send these code snippets to your app developer.

2.2 Publishing the environment

To complete the SDK implementation, you need to publish the environment to a library.

adobe_publishing.png

  1. Inside your Adobe property, select Publishing.
  2. Click Add New Library.
  3. Give it a name and under Environment, select Development.
  4. Click Save & Build for Development
  5. Once the build completes, under Development, click the three dots next to the library and select Submit for Approval.
  6. Under Submitted, click the three dots next to the library and select Build for Staging.
  7. Once the build completes, click the three dots next to the library and select Approve for Publishing.
  8. Under Approve, click the three dots next to the library and select Build & Publish to Production.

2.3 Adding Android install referrer to your app

The Android Install Referrer improves attribution accuracy, protects from install fraud, and more. It is supported from AppsFlyer Android SDK version 4.8.6.

 Note

Google deprecated the BroadcastReceiver in March 2020. 

  • This change does not affect the app.
  • You may still need the BroadcastReceiver for out-of-store attribution. Check with the store where the app is listed to make sure. 
  • Implementing the install referrer is now mandatory. 

There are two ways to add the install referrer to your app:

  • Using Gradle (recommended)
  • Manually adding the install referrer
Adding the install referrer using Gradle Manually adding the install referrer

 Add the Android Install Referrer as a dependency. You can find the latest version here.

  1. dependencies {
    //make sure to use the latest SDK version: https://mvnrepository.com/artifact/com.appsflyer/af-android-sdk
    	implementation 'com.appsflyer:af-android-sdk:5.+'
    	implementation 'com.android.installreferrer:installreferrer:1.1'
    }
  2. Sync the project to retrieve the dependencies - see the following screenshot:

    android_af_sdk_sync_gradle.png

If you are using ProGuard and want to use Google's new referrer API, set the following ProGuard rule: -dontwarn com.android.installreferrer

2.4 Setting required permissions

Adding permissions helps increase the rate of Probabilistic modeling attribution. It also allows the SDK to send more data like Wifi and carrier network data. You can find this data in raw data reports and use it for analysis and optimization of campaigns.

Add Required Permissions

  1. Add the following permissions to AndroidManifest.xml:
    <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" />
    <!-- Optional : -->
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    

Using the Adobe SDK extension

Now you can start using the Adobe SDK extension to send data to Adobe and AppsFlyer.

 Note

Currently, the Adobe Launch SDK extension only supports getting conversion data and sending events. However, when you add Adobe Launch SDK extension to your app, AppsFlyer SDK is also added. Therefore, any functionality currently missing from Adobe SDK extension can be implemented using AppsFlyer SDK.

Sending events

In-App events provide insight into what is happening in your app. We recommend taking the time and defining the events you want to record. Recording in-app events helps you measure KPIs such as ROI (Return on Investment) and LTV (Lifetime Value).

Adobe Launch SDK extension allows you to send in-app event data to both Adobe and AppsFlyer. You can then use Adobe Analytics to analyze user behavior and AppsFlyer to analyze ROI and LTV.

Android iOS
final Map<String,String> eventMap = new HashMap<>();  
eventMap.put("currency", "USD");  
eventMap.put("revenue", "200");  
eventMap.put("freehand", "param");

MobileCore.trackAction("af_purchase", eventMap);

Sending the events as specified in the code above creates an event in AppsFlyer dashboard called af_purchase with a revenue of 200 USD. This event is also sent to and appears in Adobe Analytics.

All conversion data that is sent with events is prefixed by appsflyer. See the following table for examples:

Prefixed conversion data variables
appsflyer.af_click_lookback
appsflyer.install_time
appsflyer.cost_cents_USD
appsflyer.media_source
appsflyer.af_adset
appsflyer.click_time
appsflyer.orig_cost
appsflyer.campaign

Conversion data is used in the app that you create in Adobe Mobile Services. There are other parameters that can appear in conversion data. To learn more, click here.

Getting data for deep linking and deferred deep linking

Deep linking and deferred deep linking allow you to improve your user experience. They allow you to open the app in specific activities and customize the content according to the campaign data.

To get data from deep linking, implement the extension callbacks.

Android iOS

In the global application class, implement the following code:

AppsFlyerAdobeExtension.registerAppsFlyerExtensionCallbacks(new AppsFlyerExtensionCallbacksListener() {
		@Override
		public void onCallbackReceived(Map<String, String> callback) {
			Log.d(AppsFlyerLibCore.LOG_TAG, callback.toString());
			if(callback.get("callback_type").equals("onConversionDataReceived")){
				// conversion data returned 
				if(callback.get("is_first_launch").equals("true")){
					String af_status = callback.get("af_status");
					if(af_status.equals("Non-organic")){
						Log.d(AppsFlyerLibCore.LOG_TAG, "this is first launch and a non organic install!");
					}
				}
			} else if(callback.get("callback_type").equals("onAppOpenAttribution")){
				// direct deeplink - redirect user
				Log.d(AppsFlyerLibCore.LOG_TAG, callback.toString());
			}
		}
		@Override
		public void onCallbackError(String errorMessage) {
			Log.d("TAG", errorMessage);
		}
	});

Connecting AppsFlyer conversion data

Conversion data is sent with events to the Adobe platform. These variables allow you to apply logic and rules to reporting dimensions, metrics, or filters.

adobe_analytics.png

  1. Log in to your Adobe Mobile Services.
  2. Select the relevant app and enter the Manage Variables & Metrics page.
  3. Select the Custom Variables tab and configure the variables to map AppsFlyer SDK data to the Adobe system.
  4. For each custom variable, enter a meaningful name.
  5. Select or type the mapped AppsFlyer conversion data and choose your preferred Persistence scope.

See the following table for mapping AppsFlyer Context variables:

Recommended name to map

Conversion data

AppsFlyer Lookback Window

appsflyer.af_click_lookback

AppsFlyer Install Time

appsflyer.install_time

AppsFlyer Cost Cents US

appsflyer.cost_cents_USD

AppsFlyer MediaSource

appsflyer.media_source

AppsFlyer Adset

appsflyer.af_adset

AppsFlyer Click Time

appsflyer.click_time

AppsFlyer Original Cost

appsflyer.orig_cost

AppsFlyer Campaign

appsflyer.campaign

Using AppsFlyer mapped conversion data for Analytics and Analysis

All data coming from the SDK is available in the Adobe Analytics report suite that is connected to the app.

You can use the data and its related dimensions and metrics across your generated Adobe Analytics reports and dashboards. This data is also available in the AppsFlyer dashboard for attribution and in-app event analysis.