Adobe Journey Optimizer
The Adobe Journey Optimizer (AJO) extension for Adobe Experience Platform Mobile SDKs powers push notifications for your mobile apps. This extension helps you collect user push tokens and manages interaction measurement with Adobe Experience Platform services.
The following documentation details configuration requirements and explains how to use the AJO extension. It also includes steps for implementing AJO-powered push notifications in your app.

Before starting

  1. 1.
    Read the tutorial on getting started with push configuration to learn how to configure push channels in Journey Optimizer.
  2. 3.
    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.
  • For Event Dataset, select CJM Push Tracking Experience Event Dataset
  • For Profile Dataset, select CJM Push Profile Dataset
Save your changes when finished.

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:
  1. 1.
    Navigate to the Catalog tab, locate the Adobe Journey Optimizer extension, and select Install
  2. 2.
    Select the pre-created CJM Push Tracking Event Dataset from the Event Dataset dropdown.
  3. 3.
    Select Save.
  4. 4.
    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.

Import the extension

Android
iOS (AEP 3.x)
iOS (ACP 2.x)
  1. 1.
    Add the Mobile Core, Edge, Edge Identity, and Messaging extensions to your project using the app's Gradle file.
    1
    implementation 'com.adobe.marketing.mobile:core:1.+'
    2
    implementation 'com.adobe.marketing.mobile:edge:1.+'
    3
    implementation 'com.adobe.marketing.mobile:edgeidentity:1.+'
    4
    implementation 'com.adobe.marketing.mobile:messaging:1.+'
    Copied!
  2. 2.
    Import the Mobile Core, Edge, Edge Identity, and Messaging extensions in your application class.
    Java
    1
    import com.adobe.marketing.mobile.*;
    2
    import com.adobe.marketing.mobile.edge.identity.Identity;
    Copied!
  1. 1.
    Add the Mobile Core, Edge, Edge Identity, and Messaging extensions to your project using Cocoapods. Add the following pods to your Podfile:
    1
    use_frameworks!
    2
    target 'YourTargetApp' do
    3
    pod 'AEPCore'
    4
    pod 'AEPEdge'
    5
    pod 'AEPEdgeIdentity'
    6
    pod 'AEPMessaging'
    7
    end
    Copied!
  2. 2.
    Import the Mobile Core, Edge, Edge Identity, and Messaging libraries:
    Swift
    1
    // AppDelegate.swift
    2
    3
    import AEPCore
    4
    import AEPEdge
    5
    import AEPEdgeIdentity
    6
    import AEPMessaging
    Copied!
    Objective-C
    1
    // AppDelegate.h
    2
    3
    @import AEPCore;
    4
    @import AEPEdge;
    5
    @import AEPEdgeIdentity;
    6
    @import AEPMessaging;
    Copied!
This extension is built on the AEPCore (3.x) and it is not compatible with ACPCore (2.x). Please follow the guide for migrating to the Swift AEPCore.

Register the extension with Mobile Core

Android
iOS (AEP 3.x)
iOS (ACP 2.x)
Java
1
public class MobileApp extends Application {
2
@Override
3
public void onCreate() {
4
super.onCreate();
5
MobileCore.setApplication(this);
6
MobileCore.configureWithAppID("YOUR_APP_ID");
7
try {
8
Edge.registerExtension();
9
Identity.registerExtension();
10
Messaging.registerExtension();
11
MobileCore.start(new AdobeCallback() {
12
@Override
13
public void call(final Object o) {
14
// processing after start
15
}
16
});
17
} catch (Exception e) {
18
// handle the exception
19
}
20
}
21
}
Copied!
Swift
1
// AppDelegate.swift
2
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
3
MobileCore.registerExtensions([Identity.self, Edge.self, Messaging.self], {
4
MobileCore.configureWith(appId: "YOUR_APP_ID")
5
})
6
7
...
8
}
Copied!
Objective-C
1
// AppDelegate.m
2
- (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
3
[AEPMobileCore registerExtensions:@[AEPMobileEdgeIdentity.class, AEPMobileEdge.class, AEPMobileMessaging.class] completion:^{
4
[AEPMobileCore configureWithAppId: @"YOUR_APP_ID"];
5
}];
6
7
...
8
}
Copied!
This extension is built on the AEPCore (3.x) and it is not compatible with ACPCore (2.x). Please follow the guide for migrating to the Swift AEPCore.

Sync the user push token with Adobe

After importing and registering the extensions with your application, you need to sync the push token with Adobe Experience Platform, by using the setPushIdentifier API.
Android
iOS (AEP 3.x)
iOS (ACP 2.x)
To retrieve the push token from Firebase Messaging Service, read the tutorial on retrieving the registration token within the Firebase documentation. After retrieving the push token, use the following API to sync it with the Profile in Platform.
Java
Syntax
1
public static void setPushIdentifier(final String pushIdentifier);
Copied!
Variable
Type
Description
pushIdentifier
String
The push token value.
Example
1
FirebaseMessaging.getInstance().getToken().addOnCompleteListener(new OnCompleteListener<String>() {
2
@Override
3
public void onComplete(@NonNull Task<String> task) {
4
if (task.isSuccessful()) {
5
String token = task.getResult();
6
MobileCore.setPushIdentifier(token);
7
}
8
}
9
});
Copied!
To retrieve the push token in iOS, read the tutorial on registering your application within Apple's documentation. After retrieving the push token, use the following API to sync it with the Profile in Platform.
Swift
Syntax
1
public static func setPushIdentifier(_ deviceToken: Data?)
Copied!
Variable
Type
Description
deviceToken
Data
The push token value.
Example
1
func application(_: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
2
MobileCore.setPushIdentifier(deviceToken)
3
}
Copied!
Objective-C
Syntax
1
@objc(setPushIdentifier:)
2
public static func setPushIdentifier(_ deviceToken: Data?)
Copied!
Variable
Type
Description
deviceToken
Data
The push token value.
Example
1
- (void) application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
2
[AEPMobileCore setPushIdentifier:deviceToken];
3
}
Copied!
This extension is built on the AEPCore (3.x) and it is not compatible with ACPCore (2.x). Please follow the guide for migrating to the Swift AEPCore.

Next steps

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