Adobe Journey Optimizer
The Adobe Journey Optimizer extension for Adobe Experience Platform Mobile SDKs powers push notifications for your mobile apps. This extension helps you collects user push tokens and manages interaction measurement with Adobe Experience Platform services.
The following documentation details how to use the extension as well as the required configuration across Adobe Experience Platform services, app stores, and your apps to get started with push notifications for Adobe Journey Optimizer.

Before starting

    1.
    Follow the steps in this page to configure push channel in Adobe Journey Optimizer.
    3.
    Integrate with following extensions:

Update Datastream with Profile Dataset

Navigate to a previously configured Datastream by following Configure datastreams in Adobe Experience Platform Data Collection, then:
Select the pre-created CJM Push Profile Dataset in Profile Dataset dropdown (under Adobe Experience Platform section) and select Save.

Setup Adobe Journey Optimizer extension

Configure extension in Launch

Navigate to Experience Platform Data Collection - select mobile property and navigate to Extensions from the left navigation panel:
    1.
    Navigate to the Catalog tab, locate the Adobe Journey Optimizer extension, and select Install
    2.
    Select the pre-created CJM Push Tracking Event Dataset from the Event Dataset dropdown.
    3.
    Click Save.
    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, see Set up schemas and datasets.

Implement extension in mobile app

Follow these steps to integrate the Adobe Journey Optimizer extension.

Import the extension

Android
iOS

Java

    1.
    Add the Mobile Core, Edge, EdgeIdentity 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.
    Import the Mobile Core, Edge, EdgeIdentity and Messaging extensions in your application class.
    1
    import com.adobe.marketing.mobile.*;
    2
    import com.adobe.marketing.mobile.edge.identity.Identity;
    Copied!
    1.
    Add the Mobile Core, Edge, EdgeIdentity and Messaging extensions to your project using Cocoapods. Add following pods in 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.
    Import the Mobile Core, Edge, EdgeIdentity and Messaging libraries:

Swift

1
// AppDelegate.swift
2
import AEPCore
3
import AEPEdge
4
import AEPEdgeIdentity
5
import AEPMessaging
Copied!

Objective-C

1
// AppDelegate.h
2
@import AEPCore;
3
@import AEPEdge;
4
@import AEPEdgeIdentity;
5
@import AEPMessaging;
Copied!

Register extension with Mobile Core

Android
iOS

Java

1
public class MobileApp extends Application {
2
@Override
3
public void onCreate() {
4
super.onCreate();
5
MobileCore.setApplication(this);
6
MobileCore.configureWithAppID("yourLaunchEnvironmentID");
7
try {
8
Edge.registerExtension();
9
Identity.registerExtension();
10
Messaging.registerExtension(); // register Messaging
11
MobileCore.start(new AdobeCallback() {
12
@Override
13
public void call(final Object o) {
14
// processing after start
15
}});
16
} catch (Exception e) {
17
//Log the exception
18
}
19
}
20
}
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: "yourLaunchEnvironmentID")
5
})
6
...
7
}
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: @"yourLaunchEnvironmentID"];
5
}];
6
...
7
}
Copied!

Synch user push token with Adobe

Use the setPushIdentifier API to sync user push token from the device with Adobe Experience Platform services.
Android
iOS
To retrieve the push token from Firebase Messaging Service follow this Firebase documentation. After retrieving the push token use the below core API to sync it with profile in platform.

Java

Syntax

1
public static void setPushIdentifier(final String pushIdentifier);
Copied!
    pushIdentifier - A String value denoting the push token.

Examples

1
FirebaseMessaging.getInstance().getToken()
2
.addOnCompleteListener(new OnCompleteListener<String>() {
3
@Override
4
public void onComplete(@NonNull Task<String> task) {
5
if (task.isSuccessful()) {
6
String token = task.getResult();
7
MobileCore.setPushIdentifier(token);
8
}
9
}
10
});
Copied!

Swift

To retrieve the push token in iOS, checkout the apple documentation Apple's documentation. After retrieving the push token use the below core API to sync it with profile in platform.

Syntax

1
public static func setPushIdentifier(_ deviceToken: Data?)
Copied!
    deviceToken - A Data value denoting the push token.

Examples

1
func application(_: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
2
MobileCore.setPushIdentifier(deviceToken)
3
}
Copied!

Objective-C

Syntax

1
public static func setPushIdentifier(_ deviceToken: Data?)
Copied!
    deviceToken - A Data value denoting the push token.

Examples

1
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
2
[AEPMobileCore setPushIdentifier:deviceToken];
3
}
Copied!

Next Steps

Configuration keys

To update the SDK configuration programmatically, use the following information to change the Messaging configuration values.
Key
Required
Description
Data Type
Platform
messaging.eventDataset
Yes
Experience Event Dataset Id which can be found from experience platform
String
Android/iOS
messaging.useSandbox
No
See more details in the Messaging documentation
Boolean
iOS
Last modified 1mo ago