Privacy and GDPR
The Adobe Experience Platform SDKs give you controls to manage consent and privacy obligations, such as the European Union's General Data Protection Regulation (GDPR). Developers can retrieve locally stored identities and set opt status flags for data collection and transmission.
Before implementing these controls, read the Adobe Experience Platform Privacy Service documentation.
When Adobe provides software and services to an enterprise, Adobe acts as a data processor for any personal data it processes and stores as part of providing these services. As a data processor, Adobe processes personal data in accordance with your company's permission and instructions, as set out in your agreement with Adobe. As a data controller, you can use the Experience Platform SDKs to support privacy retrieve and delete requests from your mobile apps.
Setup steps
The following sections provide details on how you can collect consent and privacy status to ensure collection of data suits your user's preferences.
Depending on the mobile extensions you use, there are two ways of collecting and enforcing consent preferences when using the Experience Platform SDKs:
- When using the Edge Network mobile extensions, you should use the Consent for Edge Network extension.
- When using Adobe Experience Cloud mobile extensions, you should use privacy status settings.
The two options are documented in detail below.
If you are using a mix of Edge Network and Adobe Experience Cloud mobile extensions, please follow the steps for configuring both consent and privacy status settings. See also the frequently asked questions about consent and privacy settings or identities.
Using Experience Platform SDKs for Edge Network
Update and get collect consent preferences
You can set the collect consent status to ensure collection of data suits your user's preferences.
Extension | Collect (y) | Collect (n) | Collect (pending) |
---|---|---|---|
Edge Network | Hits are sent | Hits are not sent | Hits are queued |
Note: When no default collect consent value is defined in configuration, the SDK defaults to Yes (y) for collect consent.
Updating the collect consent status to No (n) does not reset or clear the identities of the current user. If you need to reset all current identities, use the MobileCore.resetIdentities() API.
Collect consent settings
getConsents
You can programmatically view the current collect consent preferences status in a dictionary representation by using the following API.
Java
Syntax
Copied to your clipboardpublic static void getConsents(final AdobeCallback<Map<String, Object>> callback);
- callback - callback invoked with the current consents of the extension. If an
AdobeCallbackWithError
is provided, anAdobeError
, can be returned in the eventuality of any error that occured while getting the user consents. The callback may be invoked on a different thread.
Example
Copied to your clipboardConsent.getConsents(new AdobeCallback<Map<String, Object>>() {@Overridepublic void call(Map<String, Object> currentConsents) {if (currentConsents == null) { return; }final Map<String, Object> consents = currentConsets.get("consents");final Map<String, Object> collectConsent = consents.get("collect");final String collectConsentStatus = collectConsent.get("val");// inspect collectConsentStatus}});
Swift
Syntax
Copied to your clipboardstatic func getConsents(completion: @escaping ([String: Any]?, Error?) -> Void)
Example
Copied to your clipboardConsent.getConsents { currentConsents, error inguard error == nil else { return }guard let consents = currentConsents["consents"] as? [String: Any] else { return }guard let collectConsent = consents["collect"] as? [String: Any] else { return }let collectConsentStatus = collectConsent["val"] as? String// inspect collectConsentStatus}
Objective-C
Syntax
Copied to your clipboardstatic func getConsents(completion: @escaping ([String: Any]?, Error?) -> Void)
Example
Copied to your clipboard[AEPMobileEdgeConsent getConsents:^(NSDictionary *currentConsents, NSError *error) {if (error) { return; }NSDictionary *consents = currentConsents[@"consents"];NSDictionary *collectConsent = currentConsents[@"collect"];NSString *collectConsentStatus = collectConsent[@"val"];// inspect collectConsentStatus}];
Java
Syntax
Copied to your clipboardpublic static void getConsents(final AdobeCallback<Map<String, Object>> callback);
- callback - callback invoked with the current consents of the extension. If an
AdobeCallbackWithError
is provided, anAdobeError
, can be returned in the eventuality of any error that occured while getting the user consents. The callback may be invoked on a different thread.
Example
Copied to your clipboardConsent.getConsents(new AdobeCallback<Map<String, Object>>() {@Overridepublic void call(Map<String, Object> currentConsents) {if (currentConsents == null) { return; }final Map<String, Object> consents = currentConsets.get("consents");final Map<String, Object> collectConsent = consents.get("collect");final String collectConsentStatus = collectConsent.get("val");// inspect collectConsentStatus}});
Swift
Syntax
Copied to your clipboardstatic func getConsents(completion: @escaping ([String: Any]?, Error?) -> Void)
Example
Copied to your clipboardConsent.getConsents { currentConsents, error inguard error == nil else { return }guard let consents = currentConsents["consents"] as? [String: Any] else { return }guard let collectConsent = consents["collect"] as? [String: Any] else { return }let collectConsentStatus = collectConsent["val"] as? String// inspect collectConsentStatus}
Objective-C
Syntax
Copied to your clipboardstatic func getConsents(completion: @escaping ([String: Any]?, Error?) -> Void)
Example
Copied to your clipboard[AEPMobileEdgeConsent getConsents:^(NSDictionary *currentConsents, NSError *error) {if (error) { return; }NSDictionary *consents = currentConsents[@"consents"];NSDictionary *collectConsent = currentConsents[@"collect"];NSString *collectConsentStatus = collectConsent[@"val"];// inspect collectConsentStatus}];
updateConsents
Use this example to programmatically update the consent collect for the application user.
Java
Syntax
Copied to your clipboardpublic static void update(final Map<String, Object> consents);
Example
Copied to your clipboard// example 1, updating users collect consent to 'yes'final Map<String, Object> collectConsents = new HashMap<>();collectConsents.put("collect", new HashMap<String, String>() {{put("val", "y");}});final Map<String, Object> consents = new HashMap<>();consents.put("consents", collectConsents);Consent.update(consents);// example 2, updating users collect consent to 'no'final Map<String, Object> collectConsents = new HashMap<>();collectConsents.put("collect", new HashMap<String, String>() {{put("val", "n");}});final Map<String, Object> consents = new HashMap<>();consents.put("consents", collectConsents);Consent.update(consents);
Swift
Syntax
Copied to your clipboardstatic func update(with consents: [String: Any])
Example
Copied to your clipboard// example 1, updating users collect consent to 'yes'let collectConsent = ["collect": ["val": "y"]]let currentConsents = ["consents": collectConsent]Consent.update(with: currentConsents)// example 2, updating users collect consent to 'no'let collectConsent = ["collect": ["val": "n"]]let currentConsents = ["consents": collectConsent]Consent.update(with: currentConsents)
Objective-C
Syntax
Copied to your clipboardstatic func update(with consents: [String: Any])
Example
Copied to your clipboard// example 1, updating users collect consent to 'yes'NSDictionary *collectConsent = @{ @"collect": @{@"val": @"y"};[AEPMobileEdgeConsent updateWithConsents:@{@"consents": collectConsent}];// example 2, updating users collect consent to 'no'NSDictionary *collectConsent = @{ @"collect": @{@"val": @"n"};[AEPMobileEdgeConsent updateWithConsents:@{@"consents": collectConsent}];
Java
Syntax
Copied to your clipboardpublic static void update(final Map<String, Object> consents);
Example
Copied to your clipboard// example 1, updating users collect consent to 'yes'final Map<String, Object> collectConsents = new HashMap<>();collectConsents.put("collect", new HashMap<String, String>() {{put("val", "y");}});final Map<String, Object> consents = new HashMap<>();consents.put("consents", collectConsents);Consent.update(consents);// example 2, updating users collect consent to 'no'final Map<String, Object> collectConsents = new HashMap<>();collectConsents.put("collect", new HashMap<String, String>() {{put("val", "n");}});final Map<String, Object> consents = new HashMap<>();consents.put("consents", collectConsents);Consent.update(consents);
Swift
Syntax
Copied to your clipboardstatic func update(with consents: [String: Any])
Example
Copied to your clipboard// example 1, updating users collect consent to 'yes'let collectConsent = ["collect": ["val": "y"]]let currentConsents = ["consents": collectConsent]Consent.update(with: currentConsents)// example 2, updating users collect consent to 'no'let collectConsent = ["collect": ["val": "n"]]let currentConsents = ["consents": collectConsent]Consent.update(with: currentConsents)
Objective-C
Syntax
Copied to your clipboardstatic func update(with consents: [String: Any])
Example
Copied to your clipboard// example 1, updating users collect consent to 'yes'NSDictionary *collectConsent = @{ @"collect": @{@"val": @"y"};[AEPMobileEdgeConsent updateWithConsents:@{@"consents": collectConsent}];// example 2, updating users collect consent to 'no'NSDictionary *collectConsent = @{ @"collect": @{@"val": @"n"};[AEPMobileEdgeConsent updateWithConsents:@{@"consents": collectConsent}];
getIdentities
When using the Edge Network extensions, use the Identity.getIdentities API to retrieve all the identifier data stored locally by the SDK and send this data to your servers.
Configuration keys
To programmatically update the SDK configuration, use the following information to change your default consent values. For more information, see the configuration API reference.
Key | Description |
---|---|
consent.default | Defines the set of default consent preferences for the SDK in XDM format. For more details, see Privacy/Personalization/Marketing Preferences (Consents) Schema. |
Using Adobe Experience Cloud Solution extensions
Set and get privacy status
You can set a privacy status to ensure collection of data suits your user's preferences.
Expected Behavior | Opt In | Opt Out | Opt Unknown |
---|---|---|---|
Analytics | Hits are sent | Hits are not sent | Hits are queued |
Audience Manager | Signals, ID syncs are sent | Signals, ID syncs are not sent | Syncs are queued |
Campaign Classic | User data is stored, calls are sent | User data is cleared, calls are not sent | User data is stored, calls are not sent |
Target | Mbox requests are sent | Mbox requests are not sent | Mbox requests are queued |
Campaign Standard | User data is stored, calls are sent | User data is cleared, calls are not sent | User data is stored, calls are queued |
Analytics users: If your report suite is not timestamp enabled, hits are discarded until the privacy status changes to opt in
.
setPrivacyStatus
You can set the privacy status to one of the following values:
MobilePrivacyStatus.OPT_IN
MobilePrivacyStatus.OPT_OUT
MobilePrivacyStatus.UNKNOWN
To understand the expected behavior, see the "Set and get privacy status" table above.
Java
Syntax
Copied to your clipboardpublic static void setPrivacyStatus(final MobilePrivacyStatus privacyStatus);
Example
Copied to your clipboardMobileCore.setPrivacyStatus(MobilePrivacyStatus.OPT_OUT);
You can set privacy status to one of the following values:
PrivacyStatus.optedIn
PrivacyStatus.optedOut
PrivacyStatus.unknown
To understand the expected behavior, see the Set and get privacy status table above.
Swift
Syntax
Copied to your clipboardstatic func setPrivacyStatus(_ status: PrivacyStatus)
Example
Copied to your clipboardMobileCore.setPrivacyStatus(.optedIn)
Objective-C
Syntax
Copied to your clipboard@objc(setPrivacyStatus:)static func setPrivacyStatus(_ status: PrivacyStatus)
Example
Copied to your clipboard[AEPMobileCore setPrivacyStatus:AEPPrivacyStatusOptedIn];
You can set the privacy status to one of the following values:
MobilePrivacyStatus.OPT_IN
MobilePrivacyStatus.OPT_OUT
MobilePrivacyStatus.UNKNOWN
To understand the expected behavior, see the "Set and get privacy status" table above.
Java
Syntax
Copied to your clipboardpublic static void setPrivacyStatus(final MobilePrivacyStatus privacyStatus);
Example
Copied to your clipboardMobileCore.setPrivacyStatus(MobilePrivacyStatus.OPT_OUT);
You can set privacy status to one of the following values:
PrivacyStatus.optedIn
PrivacyStatus.optedOut
PrivacyStatus.unknown
To understand the expected behavior, see the Set and get privacy status table above.
Swift
Syntax
Copied to your clipboardstatic func setPrivacyStatus(_ status: PrivacyStatus)
Example
Copied to your clipboardMobileCore.setPrivacyStatus(.optedIn)
Objective-C
Syntax
Copied to your clipboard@objc(setPrivacyStatus:)static func setPrivacyStatus(_ status: PrivacyStatus)
Example
Copied to your clipboard[AEPMobileCore setPrivacyStatus:AEPPrivacyStatusOptedIn];
getPrivacyStatus
You can also programmatically view the current privacy status by using the following:
The enum representation of the privacy status that corresponds to the following statuses:
MobilePrivacyStatus.OPT_IN
MobilePrivacyStatus.OPT_OUT
MobilePrivacyStatus.UNKNOWN
Java
Syntax
Copied to your clipboardvoid getPrivacyStatus(AdobeCallback<MobilePrivacyStatus> callback);
- callback is invoked after the privacy status is available.
- If an instance of
AdobeCallbackWithError
is provided, and you are fetching the attributes from the Mobile SDK, the timeout value is 5000ms. If the operation times out or an unexpected error occurs, thefail
method is called with the appropriateAdobeError
.
Example
Copied to your clipboardMobileCore.getPrivacyStatus(new AdobeCallback<MobilePrivacyStatus>() {@Overridepublic void call(MobilePrivacyStatus value) {System.out.println("getPrivacyStatus: " + status);}});
The enum representation of the privacy status that corresponds to the following statuses:
PrivacyStatus.optedIn
PrivacyStatus.optedOut
PrivacyStatus.unknown
Swift
Syntax
Copied to your clipboardstatic func getPrivacyStatus(completion: @escaping (PrivacyStatus) -> Void)
- completion is invoked with the current
PrivacyStatus
.
Example
Copied to your clipboardMobileCore.getPrivacyStatus { privacyStatus inswitch privacyStatus {case .optedIn:print("Privacy Status: Opted in")case .optedOut:print("Privacy Status: Opted out")case .unknown:print("Privacy Status: Unknown")}
Objective-C
Syntax
Copied to your clipboard@objc(getPrivacyStatus:)static func getPrivacyStatus(completion: @escaping (PrivacyStatus) -> Void)
- completion is invoked with the current
PrivacyStatus
.
Example
Copied to your clipboard[AEPMobileCore getPrivacyStatus:^(AEPPrivacyStatus status) {switch (status) {case AEPPrivacyStatusOptedIn:NSLog(@"Privacy status: Opted in");break;case AEPPrivacyStatusOptedOut:NSLog(@"Privacy status: Opted out");break;case AEPPrivacyStatusUnknown:NSLog(@"Privacy status: Unknown");break;}}];
The enum representation of the privacy status that corresponds to the following statuses:
MobilePrivacyStatus.OPT_IN
MobilePrivacyStatus.OPT_OUT
MobilePrivacyStatus.UNKNOWN
Java
Syntax
Copied to your clipboardvoid getPrivacyStatus(AdobeCallback<MobilePrivacyStatus> callback);
- callback is invoked after the privacy status is available.
- If an instance of
AdobeCallbackWithError
is provided, and you are fetching the attributes from the Mobile SDK, the timeout value is 5000ms. If the operation times out or an unexpected error occurs, thefail
method is called with the appropriateAdobeError
.
Example
Copied to your clipboardMobileCore.getPrivacyStatus(new AdobeCallback<MobilePrivacyStatus>() {@Overridepublic void call(MobilePrivacyStatus value) {System.out.println("getPrivacyStatus: " + status);}});
The enum representation of the privacy status that corresponds to the following statuses:
PrivacyStatus.optedIn
PrivacyStatus.optedOut
PrivacyStatus.unknown
Swift
Syntax
Copied to your clipboardstatic func getPrivacyStatus(completion: @escaping (PrivacyStatus) -> Void)
- completion is invoked with the current
PrivacyStatus
.
Example
Copied to your clipboardMobileCore.getPrivacyStatus { privacyStatus inswitch privacyStatus {case .optedIn:print("Privacy Status: Opted in")case .optedOut:print("Privacy Status: Opted out")case .unknown:print("Privacy Status: Unknown")}
Objective-C
Syntax
Copied to your clipboard@objc(getPrivacyStatus:)static func getPrivacyStatus(completion: @escaping (PrivacyStatus) -> Void)
- completion is invoked with the current
PrivacyStatus
.
Example
Copied to your clipboard[AEPMobileCore getPrivacyStatus:^(AEPPrivacyStatus status) {switch (status) {case AEPPrivacyStatusOptedIn:NSLog(@"Privacy status: Opted in");break;case AEPPrivacyStatusOptedOut:NSLog(@"Privacy status: Opted out");break;case AEPPrivacyStatusUnknown:NSLog(@"Privacy status: Unknown");break;}}];
getSdkIdentities
To retrieve all the identifier data stored locally by the SDK as a JSON string, use the getSdkIdentities API from the Mobile Core extension.
When using both Edge Network and Adobe Solutions extensions, use both Identity.getIdentities API and MobileCore.getSdkIdentities APIs to retrieve all the identifier data stored locally by the SDK.
Configuration keys
To update the SDK configuration, programmatically, use the following information to change your privacy configuration values. For more information, Configuration API reference.
Key | Description |
---|---|
global.privacy | Setting to control privacy opt status; values may include optedin , optedout , optunknown |
Additional information
- For more information about GDPR, see GDPR and Your Business
- To see the Privacy Service API documentation, go to Privacy Service API