Adobe Journey Optimizer
The Adobe Journey Optimizer extension for Adobe Experience Platform Mobile SDKs powers push notifications and in-app messages for your mobile apps. This extension also helps you to collect user push tokens and manages interaction measurement with Adobe Experience Platform services.
The following documentation details how to use the extension and required configurations to get started with Adobe Journey Optimizer for Adobe Experience Platform services, app stores, and your apps.
Before starting
- Read the tutorial on getting started with push configuration to learn how to configure push channels in Adobe Journey Optimizer.
- Update your app's Datastream in Adobe Experience Platform Data Collection
- Integrate with following extensions:
Update Datastream with a Profile dataset
Navigate to a previously configured Datastream by following the instructions in the configure datastreams tutorial in Adobe Experience Platform Data Collection and select Add Service. In the service dropdown select Adobe Experience Platform.
- In the Event Dataset dropdown, select a dataset previously created in the Adobe Experience Platform UI.
- In the Profile Dataset dropdown, select the AJO Push Profile Dataset.
- Ensure the Personalized Destinations box is checked.
- Ensure the Adobe Journey Optimizer box is checked.
- Select Save after making these selections.
Set up a mobile property in Adobe Data Collection
To learn how to create the mobile property, please read the tutorial on creating a mobile property
Now that a mobile property is created, we can setup the Adobe Journey Optimizer extension.
Setup Adobe Journey Optimizer extension
Configure extension in the Data Collection UI
Go to the Experience Platform Data Collection UI, select mobile property and navigate to Extensions from the left navigation panel:
- Navigate to the Catalog tab, locate the Adobe Journey Optimizer extension, and select Install
- Select the pre-created AJO Push Tracking Experience Event Dataset from the Event Dataset dropdown.
- Select Save.
- Follow the publishing process to update SDK configuration.
The datasets selected should use a schema that uses the "Push Notification Tracking" XDM field group. The pre-created CJM Push Tracking Dataset contains this XDM field group in its schema definition. For more information, please read the tutorial on setting up schemas and datasets.
Implement extension in mobile app
Follow these steps to integrate the Adobe Journey Optimizer extension.
Download and import the Messaging extension
- Add the Mobile Core, Edge, Edge Identity, and Messaging extensions to your project using the app's Gradle file.
Kotlin
Copied to your clipboardimplementation(platform("com.adobe.marketing.mobile:sdk-bom:3.+"))implementation("com.adobe.marketing.mobile:core")implementation("com.adobe.marketing.mobile:edgeidentity")implementation("com.adobe.marketing.mobile:edge")implementation("com.adobe.marketing.mobile:messaging")
Groovy
Copied to your clipboardimplementation platform('com.adobe.marketing.mobile:sdk-bom:3.+')implementation 'com.adobe.marketing.mobile:core'implementation 'com.adobe.marketing.mobile:edgeidentity'implementation 'com.adobe.marketing.mobile:edge'implementation 'com.adobe.marketing.mobile:messaging'
Using dynamic dependency versions is not recommended for production apps. Please read the managing Gradle dependencies guide for more information.
- Import the Mobile Core, Edge, Edge Identity, and Messaging extensions in your application class.
Copied to your clipboardimport com.adobe.marketing.mobile.MobileCore;import com.adobe.marketing.mobile.Edge;import com.adobe.marketing.mobile.edge.identity.Identity;import com.adobe.marketing.mobile.Messaging;
- Add the Mobile Core, Edge, Edge Identity, and Messaging extensions to your project using Cocoapods. Add the following pods to your
Podfile
:
Copied to your clipboarduse_frameworks!target 'YourTargetApp' dopod 'AEPCore', '~> 5.0'pod 'AEPEdge', '~> 5.0'pod 'AEPEdgeIdentity', '~> 5.0'pod 'AEPMessaging', '~> 5.0'end
- Import the Mobile Core, Edge, Edge Identity, and Messaging libraries:
Swift
Copied to your clipboard// AppDelegate.swiftimport AEPCoreimport AEPEdgeimport AEPEdgeIdentityimport AEPMessaging
Objective-C
Copied to your clipboard// AppDelegate.h@import AEPCore;@import AEPEdge;@import AEPEdgeIdentity;@import AEPMessaging;
- Add the Mobile Core, Edge, Edge Identity, and Messaging extensions to your project using the app's Gradle file.
Kotlin
Copied to your clipboardimplementation(platform("com.adobe.marketing.mobile:sdk-bom:3.+"))implementation("com.adobe.marketing.mobile:core")implementation("com.adobe.marketing.mobile:edgeidentity")implementation("com.adobe.marketing.mobile:edge")implementation("com.adobe.marketing.mobile:messaging")
Groovy
Copied to your clipboardimplementation platform('com.adobe.marketing.mobile:sdk-bom:3.+')implementation 'com.adobe.marketing.mobile:core'implementation 'com.adobe.marketing.mobile:edgeidentity'implementation 'com.adobe.marketing.mobile:edge'implementation 'com.adobe.marketing.mobile:messaging'
Using dynamic dependency versions is not recommended for production apps. Please read the managing Gradle dependencies guide for more information.
- Import the Mobile Core, Edge, Edge Identity, and Messaging extensions in your application class.
Copied to your clipboardimport com.adobe.marketing.mobile.MobileCore;import com.adobe.marketing.mobile.Edge;import com.adobe.marketing.mobile.edge.identity.Identity;import com.adobe.marketing.mobile.Messaging;
- Add the Mobile Core, Edge, Edge Identity, and Messaging extensions to your project using Cocoapods. Add the following pods to your
Podfile
:
Copied to your clipboarduse_frameworks!target 'YourTargetApp' dopod 'AEPCore', '~> 5.0'pod 'AEPEdge', '~> 5.0'pod 'AEPEdgeIdentity', '~> 5.0'pod 'AEPMessaging', '~> 5.0'end
- Import the Mobile Core, Edge, Edge Identity, and Messaging libraries:
Swift
Copied to your clipboard// AppDelegate.swiftimport AEPCoreimport AEPEdgeimport AEPEdgeIdentityimport AEPMessaging
Objective-C
Copied to your clipboard// AppDelegate.h@import AEPCore;@import AEPEdge;@import AEPEdgeIdentity;@import AEPMessaging;
Register the extension with Mobile Core
Java
Copied to your clipboardpublic class MainApp extends Application {private final String ENVIRONMENT_FILE_ID = "YOUR_APP_ENVIRONMENT_ID";@Overridepublic void onCreate() {super.onCreate();MobileCore.setApplication(this);MobileCore.configureWithAppID(ENVIRONMENT_FILE_ID);MobileCore.registerExtensions(Arrays.asList(Edge.EXTENSION, Identity.EXTENSION, Messaging.EXTENSION),o -> Log.d("MainApp", "Adobe Experience Platform Mobile SDK was initialized."));}}
Kotlin
Copied to your clipboardclass MainApp : Application() {private var ENVIRONMENT_FILE_ID: String = "YOUR_APP_ENVIRONMENT_ID"override fun onCreate() {super.onCreate()MobileCore.setApplication(this)MobileCore.configureWithAppID(ENVIRONMENT_FILE_ID)MobileCore.registerExtensions(listOf(Edge.EXTENSION, Identity.EXTENSION, Messaging.EXTENSION)) {Log.d("MainApp", "Adobe Experience Platform Mobile SDK was initialized.")}}}
Swift
Copied to your clipboard// AppDelegate.swiftfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {MobileCore.registerExtensions([Identity.self, Edge.self, Messaging.self], {MobileCore.configureWith(appId: <ENVIRONMENT_FILE_ID>) // Replace <ENVIRONMENT_FILE_ID> with a String containing your own ID.})...}
Objective-C
Copied to your clipboard// AppDelegate.m- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[AEPMobileCore registerExtensions:@[AEPMobileEdgeIdentity.class, AEPMobileEdge.class, AEPMobileMessaging.class] completion:^{[AEPMobileCore configureWithAppId: <ENVIRONMENT_FILE_ID>]; // Replace <ENVIRONMENT_FILE_ID> with a String containing your own ID.}];...}
Java
Copied to your clipboardpublic class MainApp extends Application {private final String ENVIRONMENT_FILE_ID = "YOUR_APP_ENVIRONMENT_ID";@Overridepublic void onCreate() {super.onCreate();MobileCore.setApplication(this);MobileCore.configureWithAppID(ENVIRONMENT_FILE_ID);MobileCore.registerExtensions(Arrays.asList(Edge.EXTENSION, Identity.EXTENSION, Messaging.EXTENSION),o -> Log.d("MainApp", "Adobe Experience Platform Mobile SDK was initialized."));}}
Kotlin
Copied to your clipboardclass MainApp : Application() {private var ENVIRONMENT_FILE_ID: String = "YOUR_APP_ENVIRONMENT_ID"override fun onCreate() {super.onCreate()MobileCore.setApplication(this)MobileCore.configureWithAppID(ENVIRONMENT_FILE_ID)MobileCore.registerExtensions(listOf(Edge.EXTENSION, Identity.EXTENSION, Messaging.EXTENSION)) {Log.d("MainApp", "Adobe Experience Platform Mobile SDK was initialized.")}}}
Swift
Copied to your clipboard// AppDelegate.swiftfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {MobileCore.registerExtensions([Identity.self, Edge.self, Messaging.self], {MobileCore.configureWith(appId: <ENVIRONMENT_FILE_ID>) // Replace <ENVIRONMENT_FILE_ID> with a String containing your own ID.})...}
Objective-C
Copied to your clipboard// AppDelegate.m- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[AEPMobileCore registerExtensions:@[AEPMobileEdgeIdentity.class, AEPMobileEdge.class, AEPMobileMessaging.class] completion:^{[AEPMobileCore configureWithAppId: <ENVIRONMENT_FILE_ID>]; // Replace <ENVIRONMENT_FILE_ID> with a String containing your own ID.}];...}
Configuration keys
You can update the SDK configuration, including the Messaging configuration values, programmatically by using the following information.
Key | Required | Description | Data Type | Operating System |
---|---|---|---|---|
messaging.eventDataset | Yes | Experience Event Dataset ID which can be found from Experience Platform | String | Android/iOS |
messaging.useSandbox | No | A variable that lets the apnsSandbox environment be used for receiving push notifications. More details can be found in the messaging documentation | Boolean | iOS |
Next Steps
- Push notification implementation guide
- In-App message implementation guide
- Code-based experiences implementation guide