Consent for Edge Network
The Adobe Experience Platform Consent mobile extension enables consent preferences collection from your mobile app when using the Adobe Experience Platform Mobile SDK and the Edge Network extension.
Configure the Adobe Experience Platform Consent extension in Data Collection UI
- In Data Collection UI, in your mobile property, select the Extensions tab.
- On the Catalog tab, locate or search for the Consent extension, and select Install.
- Set your desired default consent level.
- Select Save.
- Follow the publishing process to update SDK configuration.
In order to ingest and use the data collected by this extension, follow the guide on ingesting data using the Consents and Preferences data type.
The Consent extension uses Adobe Standard 2.0 when communicating with the Edge Network.
The use of this extension is currently limited to the setting (and enforcement) of client-side, macro consent flags. While SDK APIs allow for granular and global consent preference collection, flags are not consistently enforced with upstream applications and therefore will not accommodate use cases that rely on global/granular consent preferences.
Add the Consent extension to your app
Include Consent extension as an app dependency
Add MobileCore, Edge and EdgeConsent extensions as dependencies to your project.
(Android)
Add the required dependencies to your project by including them in the app's Gradle file.
Copied to your clipboardimplementation(platform("com.adobe.marketing.mobile:sdk-bom:3.+"))implementation("com.adobe.marketing.mobile:core")implementation("com.adobe.marketing.mobile:edge")implementation("com.adobe.marketing.mobile:edgeidentity")implementation("com.adobe.marketing.mobile:edgeconsent")
Using dynamic dependency versions is not recommended for production apps. Please read the managing Gradle dependencies guide for more information.
(Android)
Add the required dependencies to your project by including them in the app's Gradle file.
Copied to your clipboardimplementation platform('com.adobe.marketing.mobile:sdk-bom:3.+')implementation 'com.adobe.marketing.mobile:core'implementation 'com.adobe.marketing.mobile:edge'implementation 'com.adobe.marketing.mobile:edgeidentity'implementation 'com.adobe.marketing.mobile:edgeconsent'
Using dynamic dependency versions is not recommended for production apps. Please read the managing Gradle dependencies guide for more information.
(iOS)
Add the required dependencies to your project using CocoaPods. Add following pods in your Podfile
:
Copied to your clipboarduse_frameworks!target 'YourTargetApp' dopod 'AEPCore', '~> 5.0'pod 'AEPEdge', '~> 5.0'pod 'AEPEdgeIdentity', '~> 5.0'pod 'AEPEdgeConsent', '~> 5.0'end
Add the required dependencies to your project by including them in the app's Gradle file.
Copied to your clipboardimplementation(platform("com.adobe.marketing.mobile:sdk-bom:3.+"))implementation("com.adobe.marketing.mobile:core")implementation("com.adobe.marketing.mobile:edge")implementation("com.adobe.marketing.mobile:edgeidentity")implementation("com.adobe.marketing.mobile:edgeconsent")
Using dynamic dependency versions is not recommended for production apps. Please read the managing Gradle dependencies guide for more information.
Add the required dependencies to your project by including them in the app's Gradle file.
Copied to your clipboardimplementation platform('com.adobe.marketing.mobile:sdk-bom:3.+')implementation 'com.adobe.marketing.mobile:core'implementation 'com.adobe.marketing.mobile:edge'implementation 'com.adobe.marketing.mobile:edgeidentity'implementation 'com.adobe.marketing.mobile:edgeconsent'
Using dynamic dependency versions is not recommended for production apps. Please read the managing Gradle dependencies guide for more information.
Add the required dependencies to your project using CocoaPods. Add following pods in your Podfile
:
Copied to your clipboarduse_frameworks!target 'YourTargetApp' dopod 'AEPCore', '~> 5.0'pod 'AEPEdge', '~> 5.0'pod 'AEPEdgeIdentity', '~> 5.0'pod 'AEPEdgeConsent', '~> 5.0'end
Initialize Adobe Experience Platform SDK with Consent Extension
Next, initialize the SDK by registering all the solution extensions that have been added as dependencies to your project with Mobile Core. For detailed instructions, refer to the initialization section of the getting started page.
Using the MobileCore.initialize
API to initialize the Adobe Experience Platform Mobile SDK simplifies the process by automatically registering solution extensions and enabling lifecycle tracking.
(Android)
This API is available starting from Android BOM version 3.8.0.
Copied to your clipboardimport com.adobe.marketing.mobile.LoggingModeimport com.adobe.marketing.mobile.MobileCore...import android.app.Application...class MainApp : Application() {override fun onCreate() {super.onCreate()MobileCore.setLogLevel(LoggingMode.DEBUG)MobileCore.initialize(this, "ENVIRONMENT_ID")}}
(Android)
This API is available starting from Android BOM version 3.8.0.
Copied to your clipboardimport com.adobe.marketing.mobile.LoggingMode;import com.adobe.marketing.mobile.MobileCore;...import android.app.Application;...public class MainApp extends Application {@Overridepublic void onCreate(){super.onCreate();MobileCore.setLogLevel(LoggingMode.DEBUG);MobileCore.initialize(this, "ENVIRONMENT_ID");}}
(iOS)
This API is available starting from iOS version 5.4.0.
Copied to your clipboard// AppDelegate.swiftimport AEPCoreimport AEPServices...final class AppDelegate: NSObject, UIApplicationDelegate {func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {MobileCore.setLogLevel(.debug)MobileCore.initialize(appId: "ENVIRONMENT_ID")...}}
(iOS)
This API is available starting from iOS version 5.4.0.
Copied to your clipboard// AppDelegate.m#import "AppDelegate.h"@import AEPCore;@import AEPServices;...@implementation AppDelegate- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[AEPMobileCore setLogLevel: AEPLogLevelDebug];[AEPMobileCore initializeWithAppId:@"ENVIRONMENT_ID" completion:^{NSLog(@"AEP Mobile SDK is initialized");}];...return YES;}@end
This API is available starting from Android BOM version 3.8.0.
Copied to your clipboardimport com.adobe.marketing.mobile.LoggingModeimport com.adobe.marketing.mobile.MobileCore...import android.app.Application...class MainApp : Application() {override fun onCreate() {super.onCreate()MobileCore.setLogLevel(LoggingMode.DEBUG)MobileCore.initialize(this, "ENVIRONMENT_ID")}}
This API is available starting from Android BOM version 3.8.0.
Copied to your clipboardimport com.adobe.marketing.mobile.LoggingMode;import com.adobe.marketing.mobile.MobileCore;...import android.app.Application;...public class MainApp extends Application {@Overridepublic void onCreate(){super.onCreate();MobileCore.setLogLevel(LoggingMode.DEBUG);MobileCore.initialize(this, "ENVIRONMENT_ID");}}
This API is available starting from iOS version 5.4.0.
Copied to your clipboard// AppDelegate.swiftimport AEPCoreimport AEPServices...final class AppDelegate: NSObject, UIApplicationDelegate {func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {MobileCore.setLogLevel(.debug)MobileCore.initialize(appId: "ENVIRONMENT_ID")...}}
This API is available starting from iOS version 5.4.0.
Copied to your clipboard// AppDelegate.m#import "AppDelegate.h"@import AEPCore;@import AEPServices;...@implementation AppDelegate- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[AEPMobileCore setLogLevel: AEPLogLevelDebug];[AEPMobileCore initializeWithAppId:@"ENVIRONMENT_ID" completion:^{NSLog(@"AEP Mobile SDK is initialized");}];...return YES;}@end
Configuration keys
To update the SDK configuration programmatically, use the following information to change the Edge Consent configuration values.
Key | Required | Description | Data Type |
---|---|---|---|
consent.default | No | Consents in XDM format. For more details, see Privacy/Personalization/Marketing Preferences (Consents) Schema. | Map |