Adobe Campaign Standard でサポートされるモバイルのユースケース mobile-use-cases
このページでは、Adobe Experience Platform SDKsを使用してAdobe Campaign Standardでサポートされているすべてのモバイルのユースケースのリストを表示します。 これらのユースケースをサポートするには、Adobe Experience Platform SDKs、tags in Adobe Experience PlatformおよびAdobe Campaign Standardのインストールと設定が必要です。 これについて詳しくは、このページを参照してください。
Adobe Campaign Standardでは、次のユースケースをサポートしています。
これらのユースケースを設定するには、次の拡張機能が必要です。
- Adobe Campaign Standard
Campaign Standard拡張機能をインストールして設定するには、Data Collection UIでのCampaign Standard拡張機能の設定を参照してください。 - Mobile Coreが自動的にインストールされます。
モバイルコア拡張機能について詳しくは、 モバイルコア を参照してください。 - Profileが自動的にインストールされます。
プロファイル拡張機能について詳しくは、 プロファイル を参照してください。
Campaign Standardでのモバイルプロファイルの登録 register-mobile-profile
IOSで実現 register-mobile-profile-ios
IOSでは、次のExperience Platform APIsが必要です。
- Lifecycle Start、アプリの開始時およびアプリがフォアグラウンドにあるとき。
- アプリがバックグラウンドで実行されている場合はLifecycle Pause。
詳しくは、iOSのライフサイクル拡張機能を参照してください。
IOSを使用したユースケースのサンプルを以下に示します。
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
ACPCore.setLogLevel(.debug)
appId = SettingsBundle.getLaunchAppId()
//===== START Set up Adobe 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)
}
Androidで実現 register-mobile-profile-android
Androidでは、次のExperience Platform APIsが必要です。
- OnResume
- OnPause
詳しくは、Androidのライフサイクル拡張機能を参照してください。
Androidを使用したこのユースケースのサンプル実装を次に示します。
@Override
public void onResume() {
super.onResume();
MobileCore.setApplication(getApplication());
MobileCore.lifecycleStart(null);
handleOpenTracking();
}
@Override
public void onPause() {
super.onPause();
MobileCore.lifecyclePause();
}
Adobe Campaign Standardへのプッシュトークンの送信 send-push-token
IOSで実現 send-push-token-ios
IOSでは、次のExperience Platform SDKが必要です。
- setPushIdentifier
詳細については、setPushIdentifierを参照してください。
IOSを使用したこのユースケースのサンプル実装を次に示します。
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
// Register Device Token
ACPCore.setPushIdentifier(deviceToken)
Androidで実現 send-push-token-android
Androidでは、次のExperience Platform SDKが必要です。
- setPushIdentifier
詳細については、setPushIdentifierを参照してください。
Androidを使用したこのユースケースのサンプル実装を次に示します。
@Override
public void onNewToken(String token) {
Log.d(TAG, "Refreshed token: " + token);
MobileCore.setPushIdentifier(token);
}
アプリケーションのカスタムデータでモバイルプロファイルを充実させましょう enrich-mobile-profile-custom
このユースケースを機能させるには、PII ポストバックのルールを作成する必要があります。 詳しくは、PII Postbacksを参照してください。
IOSで実現 enrich-mobile-profile-custom-ios
IOSでは、次のExperience Platform APIが必要です。
- collectPII
詳しくは、collectPIIを参照してください。
IOSを使用したユースケースのサンプルを以下に示します。
ACPCore.collectPii(["pushPlatform":"apns", "email":email, "firstName":firstName, "lastName":lastName])
Androidで実現 enrich-mobile-profile-custom-android
Androidでは、次のExperience Platform APIが必要です。
- collectPII
詳しくは、collectPIIを参照してください。
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-mobile-profile-lifecycle
このユースケースを機能させるには、PII ポストバックのルールを作成する必要があります。 詳しくは、PII Postbacksを参照してください。
IOSで実現 enrich-mobile-profile-lifecycle-ios
IOSでは、次のExperience Platform APIsが必要です。
- Lifecycle Start、アプリの開始時およびアプリがフォアグラウンドにあるとき。
- アプリがバックグラウンドで実行されている場合はLifecycle Pause。
詳しくは、iOSのライフサイクル拡張機能を参照してください。
IOSを使用したユースケースのサンプルを以下に示します。
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
ACPCore.setLogLevel(.debug)
appId = SettingsBundle.getLaunchAppId()
//===== START Set up Adobe 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)
}
Androidで実現 enrich-mobile-profile-lifecycle-android
Androidでは、次のExperience Platform APIsが必要です。
- OnResume
- OnPause
詳しくは、Androidのライフサイクル拡張機能を参照してください。
Androidを使用したこのユースケースのサンプル実装を次に示します。
@Override
public void onResume() {
super.onResume();
MobileCore.setApplication(getApplication());
MobileCore.lifecycleStart(null);
handleOpenTracking();
}
@Override
public void onPause() {
super.onPause();
MobileCore.lifecyclePause();
}
プッシュ通知によるユーザーインタラクションの追跡 track-user-push
ポストバックを追跡するプッシュ通知のルールを作成する必要があります。 詳細については、 ポストバックを追跡するプッシュ通知を参照してください。
IOSで実現 track-user-push-ios
IOSでは、次のExperience Platform SDKが必要です。
- trackAction. 詳しくは、 アプリのアクションを追跡を参照してください。
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"])
}
Androidで実現 track-user-push-android
Androidでは、次のExperience Platform SDKが必要です。
- trackAction
詳しくは、 アプリのアクションを追跡を参照してください。
Androidを使用したこのユースケースのサンプル実装を次に示します。
contextData.put("deliveryId", deliveryId);
contextData.put("broadlogId", messageId);
contextData.put("action", "2");
MobileCore.trackAction("tracking", contextData);
アプリケーションにカスタムイベントを実装して、アプリ内メッセージをトリガーする custom-event-inapp
IOSで実現 custom-event-inapp-ios
IOSでは、次のExperience Platform SDKが必要です。
- trackAction. 詳しくは、 アプリのアクションを追跡を参照してください。
IOSを使用したユースケースのサンプルを以下に示します。
ACPCore.trackAction(mobileEventName, data: [:] )
Androidで実現 custom-event-inapp-android
Androidでは、次のExperience Platform SDKが必要です。
- trackAction
詳しくは、 アプリのアクションを追跡を参照してください。
Androidを使用したこのユースケースのサンプル実装を次に示します。
MobileCore.trackAction(mobileEventText, new HashMap<String,String>());
追加認証のためのリンクフィールドを設定します linkage-fields-inapp
IOSで実現 linkage-fields-inapp-ios
IOSのアプリ内メッセージに基づくプロファイルテンプレートの追加認証にリンクフィールドを設定するには、次のExperience Platform SDKが必要です。
- リンク フィールドの設定
詳細については、 リンク フィールドの設定を参照してください。 - リンクフィールドのリセット
詳細については、 リンクフィールドのリセット を参照してください。
IOSのユースケースのサンプルを以下に示します。
リンクフィールドを設定するには:
var linkageFields = [String: String]()
linkageFields["cusEmail"] = "john.doe@email.com"
ACPCampaign.setLinkageFields(linkageFields)
リンクフィールドをリセットするには:
ACPCampaign.resetLinkageFields(linkageFields)
Androidで実現 linkage-fields-inapp-android
Androidのアプリ内メッセージに基づくプロファイルテンプレートの追加認証にリンクフィールドを設定するには、次のExperience Platform SDKが必要です。
- リンク フィールドの設定
詳細については、 リンク フィールドの設定を参照してください。 - リンクフィールドのリセット
詳細については、 リンクフィールドのリセット を参照してください。
Androidのユースケースのサンプルを以下に示します。
リンクフィールドを設定するには:
HashMap<String, String> linkageFields = new HashMap<String, String>();
linkageFields.put("cusEmail", "john.doe@email.com");
Campaign.setLinkageFields(linkageFields);
リンクフィールドをリセットするには:
Campaign.resetLinkageFields()