Privacy and GDPR

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:
  1. 1.
    When using the Edge Network mobile extensions, you should use the Consent for Edge Network extension.
  2. 2.
    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

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.
Android
iOS (AEP 3.x)
Java
You can set the collect consent to one of the following values:
  • y
  • n
To understand the expected behavior, see the Update and get collect consent preferences table above.
You can set the collect consent to one of the following values:
Swift
  • y
  • n
Objective-C
You can set the collect consent to one of the following values:
  • y
  • n
To understand the expected behavior, see the Update and get collect consent preferences table above.

getConsents

You can programmatically view the current collect consent preferences status in a dictionary representation by using the following API.
Android
iOS (AEP 3.x)
Java
Syntax
1
public static void getConsents(final AdobeCallback<Map<String, Object>> callback);
Copied!
  • callback - callback invoked with the current consents of the extension. If an AdobeCallbackWithError is provided, an AdobeError, can be retruned in the eventuality of any error that occured while getting the user consents. The callback may be invoked on a different thread.
Example
1
Consent.getConsents(new AdobeCallback<Map<String, Object>>() {
2
@Override
3
public void call(Map<String, Object> currentConsents) {
4
if (currentConsents == null) { return; }
5
final Map<String, Object> consents = currentConsets.get("consents");
6
final Map<String, Object> collectConsent = consents.get("collect");
7
final String collectConsentStatus = collectConsent.get("val");
8
// inspect collectConsentStatus
9
}
10
});
Copied!
Swift
Syntax
1
static func getConsents(completion: @escaping ([String: Any]?, Error?) -> Void)
Copied!
Example
1
Consent.getConsents { currentConsents, error in
2
guard error == nil else { return }
3
guard let consents = currentConsents["consents"] as? [String: Any] else { return }
4
guard let collectConsent = consents["collect"] as? [String: Any] else { return }
5
let collectConsentStatus = collectConsent["val"] as? String
6
// inspect collectConsentStatus
7
}
Copied!
Objective-C
Syntax
1
static func getConsents(completion: @escaping ([String: Any]?, Error?) -> Void)
Copied!
Example
1
[AEPMobileEdgeConsent getConsents:^(NSDictionary *currentConsents, NSError *error) {
2
if (error) { return; }
3
NSDictionary *consents = currentConsents[@"consents"];
4
NSDictionary *collectConsent = currentConsents[@"collect"];
5
NSString *collectConsentStatus = collectConsent[@"val"];
6
// inspect collectConsentStatus
7
}];
Copied!

updateConsents

Use this example to programmatically update the consent collect for the application user.
Note: After a user has selected collect consent no (n), the SDK will not allow you to set the users collect consent to yes (y).
Android
iOS (AEP 3.x)
Java
Syntax
1
public static void update(final Map<String, Object> consents);
Copied!
Example
1
// example 1, updating users collect consent to 'yes'
2
final Map<String, Object> collectConsents = new HashMap<>();
3
collectConsents.put("collect", new HashMap<String, String>() {
4
{
5
put("val", "y");
6
}
7
});
8
9
final Map<String, Object> consents = new HashMap<>();
10
consents.put("consents", collectConsents);
11
12
Consent.update(consents);
13
14
// example 2, updating users collect consent to 'no'
15
final Map<String, Object> collectConsents = new HashMap<>();
16
collectConsents.put("collect", new HashMap<String, String>() {
17
{
18
put("val", "n");
19
}
20
});
21
22
final Map<String, Object> consents = new HashMap<>();
23
consents.put("consents", collectConsents);
24
25
Consent.update(consents);
Copied!
Swift
Syntax
1
static func update(with consents: [String: Any])
Copied!
Example
1
// example 1, updating users collect consent to 'yes'
2
let collectConsent = ["collect": ["val": "y"]]
3
let currentConsents = ["consents": collectConsent]
4
Consent.update(with: currentConsents)
5
6
// example 2, updating users collect consent to 'no'
7
let collectConsent = ["collect": ["val": "n"]]
8
let currentConsents = ["consents": collectConsent]
9
Consent.update(with: currentConsents)
Copied!
Objective-C
Syntax
1
static func update(with consents: [String: Any])
Copied!
Example
1
// example 1, updating users collect consent to 'yes'
2
NSDictionary *collectConsent = @{ @"collect": @{@"val": @"y"};
3
[AEPMobileEdgeConsent updateWithConsents:@{@"consents": collectConsent}];
4
5
// example 2, updating users collect consent to 'no'
6
NSDictionary *collectConsent = @{ @"collect": @{@"val": @"n"};
7
[AEPMobileEdgeConsent updateWithConsents:@{@"consents": collectConsent}];
Copied!

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

Android
iOS (ACP 3.x)
iOS (ACP 2.x)
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
1
public static void setPrivacyStatus(final MobilePrivacyStatus privacyStatus);
Copied!
Example
1
MobileCore.setPrivacyStatus(MobilePrivacyStatus.OPT_OUT);
Copied!
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
1
static func setPrivacyStatus(_ status: PrivacyStatus)
Copied!
Example
1
MobileCore.setPrivacyStatus(.optedIn)
Copied!
Objective-C
Syntax
1
@objc(setPrivacyStatus:)
2
static func setPrivacyStatus(_ status: PrivacyStatus)
Copied!
Example
1
[AEPMobileCore setPrivacyStatus:AEPPrivacyStatusOptedIn];
Copied!
You can set privacy status to one of the following values:
  • ACPMobilePrivacyStatusOptIn
  • ACPMobilePrivacyStatusOptOut
  • ACPMobilePrivacyStatusUnknown
To understand the expected behavior, see the Set and get privacy status table above.
Swift
Syntax
1
class func setPrivacyStatus(_ status: ACPMobilePrivacyStatus) {
2
}
Copied!
Example
1
ACPCore.privacyStatus = ACPMobilePrivacyStatusOptIn
Copied!
Objective-C
Syntax
1
+ (void) setPrivacyStatus: (ACPMobilePrivacyStatus) status;
Copied!
Example
1
[ACPCore setPrivacyStatus:ACPMobilePrivacyStatusOptIn];
Copied!

getPrivacyStatus

You can also programmatically view the current privacy status by using the following:
Android
iOS (AEP 3.x)
iOS (ACP 2.x)
The enum representation of the privacy status that corresponds to the following statuses:
  • MobilePrivacyStatus.OPT_IN
  • MobilePrivacyStatus.OPT_OUT
  • MobilePrivacyStatus.UNKNOWN
Java
Syntax
1
void getPrivacyStatus(AdobeCallback<MobilePrivacyStatus> callback);
Copied!
  • 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, the fail method is called with the appropriate AdobeError.
Example
1
MobileCore.getPrivacyStatus(new AdobeCallback<MobilePrivacyStatus>() {
2
@Override
3
public void call(MobilePrivacyStatus value) {
4
System.out.println("getPrivacyStatus: " + status);
5
}
6
});
Copied!
The enum representation of the privacy status that corresponds to the following statuses:
  • PrivacyStatus.optedIn
  • PrivacyStatus.optedOut
  • PrivacyStatus.unknown
Swift
Syntax
1
static func getPrivacyStatus(completion: @escaping (PrivacyStatus) -> Void)
Copied!
  • completion is invoked with the current PrivacyStatus.
Example
1
MobileCore.getPrivacyStatus { privacyStatus in
2
switch privacyStatus {
3
case .optedIn:
4
print("Privacy Status: Opted in")
5
case .optedOut:
6
print("Privacy Status: Opted out")
7
case .unknown:
8
print("Privacy Status: Unknown")
9
}
Copied!
Objective-C
Syntax
1
@objc(getPrivacyStatus:)
2
static func getPrivacyStatus(completion: @escaping (PrivacyStatus) -> Void)
Copied!
  • completion is invoked with the current PrivacyStatus.
Example
1
[AEPMobileCore getPrivacyStatus:^(AEPPrivacyStatus status) {
2
switch (status) {
3
case AEPPrivacyStatusOptedIn:
4
NSLog(@"Privacy status: Opted in");
5
break;
6
case AEPPrivacyStatusOptedOut:
7
NSLog(@"Privacy status: Opted out");
8
break;
9
case AEPPrivacyStatusUnknown:
10
NSLog(@"Privacy status: Unknown");
11
break;
12
}
13
}];
Copied!
The enum representation of the privacy status that corresponds to the following statuses:
  • ACPMobilePrivacyStatusOptIn
  • ACPMobilePrivacyStatusOptOut
  • ACPMobilePrivacyStatusUnknown
Swift
Syntax
1
class func getPrivacyStatus(_ callback: @escaping (_ status: ACPMobilePrivacyStatus) -> Void)
2
3
class func getPrivacyStatus(withCompletionHandler completionHandler: @escaping (_ status: ACPMobilePrivacyStatus, _ error: Error?) -> Void)
Copied!
  • callback is invoked after the privacy status is available.
  • completionHandler is invoked with the current privacy status, or error if an unexpected error occurs or the request times out. The default timeout is 5000ms.
Example
1
ACPCore.getPrivacyStatus(
2
{ status in
3
switch status {
4
case ACPMobilePrivacyStatusOptIn:
5
print("Privacy Status: Opt-In")
6
default:
7
break
8
}
9
})
10
11
12
ACPCore.getPrivacyStatus(withCompletionHandler: { status, error in
13
if error != nil {
14
// handle error here
15
} else {
16
// handle the retrieved privacy status
17
}
18
})
Copied!
Objective-C
Syntax
1
+ (void) getPrivacyStatus: (nonnull void (^) (ACPMobilePrivacyStatus status)) callback;
2
+ (void) getPrivacyStatusWithCompletionHandler: (nonnull void (^) (ACPMobilePrivacyStatus status, NSError* _Nullable error)) completionHandler;
Copied!
  • callback is invoked after the privacy status is available.
  • completionHandler is invoked with the current privacy status, or error if an unexpected error occurs or the request times out. The default timeout is 5000ms.
Example
1
[ACPCore
2
getPrivacyStatus:^(ACPMobilePrivacyStatus status) {
3
switch (status) {
4
case ACPMobilePrivacyStatusOptIn: NSLog(@"Privacy Status: Opt-In"); break;
5
}
6
}];
7
8
9
[ACPCore getPrivacyStatusWithCompletionHandler:^(ACPMobilePrivacyStatus status, NSError * _Nullable error) {
10
if (error) {
11
// handle error here
12
} else {
13
// handle the retrieved privacy status
14
}
15
}];
Copied!

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

Video

Additional information

Last modified 1mo ago