ÃÛ¶¹ÊÓÆµ

Mobile use cases supported in ÃÛ¶¹ÊÓÆµ Campaign Standard mobile-use-cases

In this page, you will find the list of every mobile use cases supported in ÃÛ¶¹ÊÓÆµ Campaign Standard using the ÃÛ¶¹ÊÓÆµ Experience Platform SDKs. Note that supporting these use cases involve installing and configuring the ÃÛ¶¹ÊÓÆµ Experience Platform SDKs, tags in ÃÛ¶¹ÊÓÆµ Experience Platform, and ÃÛ¶¹ÊÓÆµ Campaign Standard. For more information on this, refer to this page.

ÃÛ¶¹ÊÓÆµ Campaign Standard supports the following use cases:

To configure these use cases, you need the following extensions:

  • ÃÛ¶¹ÊÓÆµ Campaign Standard
    To install and configure the Campaign Standard extension, see .
  • Mobile Core, which is automatically installed.
    For more information about the Mobile Core extension, see .
  • Profile, which is automatically installed.
    For more information about the Profile extension, see .

Register a mobile profile in Campaign Standard register-mobile-profile

With iOS register-mobile-profile-ios

In iOS, the following Experience Platform APIs are required:

  • Lifecycle Start, when the app is started and when the app is in the foreground.
  • Lifecycle Pause, when the app is in the background.

For more information, see .

Here is a sample implementation of this use case with iOS:

 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {


 ACPCore.setLogLevel(.debug)
 appId = SettingsBundle.getLaunchAppId()

 //===== START Set up ÃÛ¶¹ÊÓÆµ SDK =====
 ACPCore.configure(withAppId: appId)

 ACPCampaign.registerExtension()
 ACPIdentity.registerExtension()
 ACPLifecycle.registerExtension()
 ACPUserProfile.registerExtension()
 ACPSignal.registerExtension()
 ACPCore.start()
 ACPCore.lifecycleStart(nil)

 return true
 }

func applicationDidEnterBackground(_ application: UIApplication) {
 ACPCore.lifecyclePause()
 }

 func applicationDidBecomeActive(_ application: UIApplication) {
 // Workaround until jira AMSDK-7411 is fixed.
 sleep(2)
 ACPCore.lifecycleStart(nil)
 }

With Android register-mobile-profile-android

In Android, the following Experience Platform APIs are required:

  • OnResume
  • OnPause

For more information, see .

Here is a sample implementation for this use case with Android:

@Override

public void onResume() {
 super.onResume();
 MobileCore.setApplication(getApplication());
 MobileCore.lifecycleStart(null);
 handleOpenTracking();
 }

 @Override
 public void onPause() {
 super.onPause();
 MobileCore.lifecyclePause();
 }

Send a push token to ÃÛ¶¹ÊÓÆµ Campaign Standard send-push-token

With iOS send-push-token-ios

In iOS, the following Experience Platform SDK is required:

  • setPushIdentifier
    For more information, see .

Here is the sample implementation for this use case with iOS:

func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {

 // Register Device Token
 ACPCore.setPushIdentifier(deviceToken)

With Android send-push-token-android

In Android, the following Experience Platform SDK is required:

  • setPushIdentifier
    For more information, see .

Here is the sample implementation for this use case with Android:

@Override
public void onNewToken(String token) {
    Log.d(TAG, "Refreshed token: " + token);
    MobileCore.setPushIdentifier(token);
}

Enrich a mobile profile with custom data from your application enrich-mobile-profile-custom

For this use case to work, you need to create rules for PII postbacks. For more information, see PII Postbacks.

With iOS enrich-mobile-profile-custom-ios

In iOS, the following Experience Platform API is required:

  • collectPII
    For more information, see collectPII.

Here is a sample implementation of this use case with iOS:

ACPCore.collectPii(["pushPlatform":"apns", "email":email, "firstName":firstName, "lastName":lastName])

With Android enrich-mobile-profile-custom-android

In Android, the following Experience Platform API is required:

  • collectPII
    For more information, see collectPII.

Here is a sample implementation for this use case with Android:

HashMap<String, String> data = new HashMap<>();
data.put("pushPlatform", "gcm");
data.put("firstName", firstNameText);
data.put("lastName", lastNameText);
data.put("email", emailText);
MobileCore.collectPii(data);

Enrich a mobile profile with Lifecycle data from your application enrich-mobile-profile-lifecycle

For this use case to work, you need to create rules for PII postbacks. For more information, see PII Postbacks.

NOTE
ÃÛ¶¹ÊÓÆµ Campaign does not distinguish between custom data or lifecycle data from the mobile app. Both types of data can be sent to server using a collectPii postback rule in response to an event in the mobile app.

With iOS enrich-mobile-profile-lifecycle-ios

In iOS, the following Experience Platform APIs are required:

  • Lifecycle Start, when the app is started and when the app is in the foreground.
  • Lifecycle Pause, when the app is in the background.

For more information, see .

Here is a sample implementation of this use case with iOS:

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {


 ACPCore.setLogLevel(.debug)
 appId = SettingsBundle.getLaunchAppId()

 //===== START Set up ÃÛ¶¹ÊÓÆµ SDK =====
 ACPCore.configure(withAppId: appId)

 ACPCampaign.registerExtension()
 ACPIdentity.registerExtension()
 ACPLifecycle.registerExtension()
 ACPUserProfile.registerExtension()
 ACPSignal.registerExtension()
 ACPCore.start()
 ACPCore.lifecycleStart(nil)

 return true
 }

func applicationDidEnterBackground(_ application: UIApplication) {
 ACPCore.lifecyclePause()
 }

 func applicationDidBecomeActive(_ application: UIApplication) {
 // Workaround until jira AMSDK-7411 is fixed.
 sleep(2)
 ACPCore.lifecycleStart(nil)
 }

With Android enrich-mobile-profile-lifecycle-android

In Android, the following Experience Platform APIs are required:

  • OnResume
  • OnPause

For more information, see .

Here is a sample implementation for this use case with Android:

@Override

public void onResume() {
 super.onResume();
 MobileCore.setApplication(getApplication());
 MobileCore.lifecycleStart(null);
 handleOpenTracking();
 }

 @Override
 public void onPause() {
 super.onPause();
 MobileCore.lifecyclePause();
 }

Track user interaction with Push notifications track-user-push

You need to create rules for push notifications tracking postback. For more information, see Push notifications tracking postback.

With iOS track-user-push-ios

In iOS, the following Experience Platform SDK is required:

  • trackAction. For more information, see .

Here is a sample implementation of this use case with iOS:

let deliveryId = userInfo["_dId"] as? String
let broadlogId = userInfo["_mId"] as? String
if (deliveryId != nil && broadlogId != nil) {
    ACPCore.trackAction("tracking", data: ["deliveryId": deliveryId!, "broadlogId": broadlogId!, "action":"2"])
}

With Android track-user-push-android

In Android, the following Experience Platform SDK is required:

  • trackAction
    For more information, see .

Here is a sample implementation for this use case with Android:

contextData.put("deliveryId", deliveryId);
contextData.put("broadlogId", messageId);
contextData.put("action", "2");
MobileCore.trackAction("tracking", contextData);

Implement a custom event in your application to trigger In-App messages custom-event-inapp

With iOS custom-event-inapp-ios

In iOS, the following Experience Platform SDK is required:

  • trackAction. For more information, see .

Here is a sample implementation of this use case with iOS:

ACPCore.trackAction(mobileEventName, data: [:] )

With Android custom-event-inapp-android

In Android, the following Experience Platform SDK is required:

  • trackAction
    For more information, see .

Here is a sample implementation for this use case with Android:

MobileCore.trackAction(mobileEventText, new HashMap<String,String>());

Set linkage fields for additional authentication linkage-fields-inapp

With iOS linkage-fields-inapp-ios

To set linkage fields for additional authentication for the profile template that is based on In-App messages in iOS, the following Experience Platform SDK is required:

  • Set linkage fields
    For more information, see .
  • Reset linkage fields
    For more information, see .

Here is are sample implementations of this use case with iOS.

To set linkage fields:

var linkageFields = [String: String]()
linkageFields["cusEmail"] = "john.doe@email.com"
ACPCampaign.setLinkageFields(linkageFields)

To reset linkage fields:

ACPCampaign.resetLinkageFields(linkageFields)

With Android linkage-fields-inapp-android

To set linkage fields for additional authentication for the profile template that is based on In-App messages in Android, the following Experience Platform SDK is required:

  • Set linkage fields
    For more information, see .
  • Reset linkage fields
    For more information, see .

Here is are sample implementations of this use case with Android.

To set linkage fields:

HashMap<String, String> linkageFields = new HashMap<String, String>();
linkageFields.put("cusEmail", "john.doe@email.com");
Campaign.setLinkageFields(linkageFields);

To reset linkage fields:

Campaign.resetLinkageFields()
recommendation-more-help
3ef63344-7f3d-48f9-85ed-02bf569c4fff