The Experience Platform SDKs give you controls to manage consent and privacy obligations under 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 Adobe's GDPR 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 GDPR retrieve and delete requests from your mobile apps.
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 not sent | Hits queued |
Audience Manager | Signals, ID syncs are sent | Signals, ID syncs not sent | Syncs queued |
Campaign Classic | User data stored, calls are sent | User data cleared, calls not sent | User data stored, calls not sent |
Target | Mbox requests are sent | Mbox requests not sent | Mbox requests queued |
{% hint style="info" %}
Analytics users: If your report suite is not timestamp enabled, hits are discarded until the privacy status changes to opt in
.
{% endhint %}
To programmatically set the privacy status for the app user:
{% tabs %} {% tab title="Android" %}
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.
public static void setPrivacyStatus(final MobilePrivacyStatus privacyStatus);
MobileCore.setPrivacyStatus(MobilePrivacyStatus.OPT_OUT);
{% endtab %}
{% tab title="iOS" %}
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.
+ (void) setPrivacyStatus: (ACPMobilePrivacyStatus) status;
[ACPCore setPrivacyStatus:ACPMobilePrivacyStatusOptIn
{% endtab %} {% endtabs %}
You can also programmatically view the current privacy status by using the following:
{% hint style="info" %} The following API returns an enum representation of the privacy status for the user. {% endhint %}
{% tabs %} {% tab title="Android" %}
The enum representation of the privacy status that corresponds to the following statuses:
MobilePrivacyStatus.OPT_IN
MobilePrivacyStatus.OPT_OUT
MobilePrivacyStatus.UNKNOWN
void 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
.
MobileCore.getPrivacyStatus(new AdobeCallback<MobilePrivacyStatus>() {
@Override
public void call(MobilePrivacyStatus value) {
System.out.println("getPrivacyStatus: " + status);
}
});
{% endtab %}
{% tab title="iOS" %}
The enum representation of the privacy status that corresponds to the following statuses:
ACPMobilePrivacyStatusOptIn
ACPMobilePrivacyStatusOptOut
ACPMobilePrivacyStatusUnknown
+ (void) getPrivacyStatus: (nonnull void (^) (ACPMobilePrivacyStatus status)) callback;
+ (void) getPrivacyStatusWithCompletionHandler: (nonnull void (^) (ACPMobilePrivacyStatus status, NSError* _Nullable error)) completionHandler;
- 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.
[ACPCore
getPrivacyStatus:^(ACPMobilePrivacyStatus status) {
switch (status) {
case ACPMobilePrivacyStatusOptIn: NSLog(@"Privacy Status: Opt-In"); break;
}
}];
[ACPCore getPrivacyStatusWithCompletionHandler:^(ACPMobilePrivacyStatus status, NSError * _Nullable error) {
if (error) {
// handle error here
} else {
// handle the retrieved privacy status
}
}];
{% endtab %} {% endtabs %}
The following SDK identities (as applicable) are locally stored:
- Company Context - IMS Org IDs
- Experience Cloud ID (MID)
- User IDs
- Integration codes (ADID, push IDs)
- Data source IDs (DPID, DPUUID)
- Analytics IDs (AVID, AID, VID, and associated RSIDs)
- Target legacy IDs (TNTID, TNT3rdpartyID)
- Audience Manager ID (UUID)
To retrieve data as a JSON string from the SDKs, and send this data to your servers, use the following:
{% hint style="warning" %} You must call the API below and retrieve identities stored in the SDK, before the user opts out. {% endhint %}
{% tabs %} {% tab title="Android" %}
void getSdkIdentities(AdobeCallback<String> callback);
- callback is invoked with the SDK identities as a JSON string.
- 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
.
MobileCore.getSdkIdentities(new AdobeCallback<String>() {
@Override
public void call(String value) {
// handle the json string
}
});
{% endtab %}
{% tab title="iOS" %}
+ (void) getSdkIdentities: (nullable void (^) (NSString* __nullable content)) callback;
+ (void) getSdkIdentitiesWithCompletionHandler: (nullable void (^) (NSString* __nullable content, NSError* _Nullable error)) completionHandler;
- callback is invoked with the SDK identities as a JSON string.
- completionHandler is invoked with the SDK identities as a JSON string, or error if an unexpected error occurs or the request times out. The default timeout is 5000ms.
[ACPCore getSdkIdentities:^(NSString * _Nullable content){
NSLog(content);
}];
[ACPCore getSdkIdentitiesWithCompletionHandler:^(NSString * _Nullable content, NSError * _Nullable error) {
if (error) {
// handle error here
} else {
// handle the retrieved identities
NSLog(content);
}
}];
{% endtab %} {% endtabs %}
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 optedid , optedout , optunknown |
{% embed url="https://www.youtube.com/watch?v=kgUJNFQp3PI" caption="Using Mobile SDK Privacy APIs" %}
- For more information about GDPR, see GDPR and Your Business
- To see the GDPR API documentation, go to General Data Protection Regulation API