Sync consent across apps (Beta)

Select platform: Android iOS

To reduce redundant GDPR messages for your users, Sync consent across multiple apps. When a user makes a consent decision in a consent-syncing enabled app, this choice is stored using a consent sync identifier you provide. That consent decision automatically applies across all other apps that share the same consent sync identifier. Only Google uses this identifier to store and retrieve a user's consent decision.

This guide covers syncing GDPR consent from the User Messaging Platform (UMP) SDK in your mobile app.

Prerequisites

Before you begin, do the following:

  • Complete the Get started guide.
  • Enable consent syncing for eligible apps in the Privacy & Messaging tab of the Ad Manager UI.

Across the apps where you're able to identify the user, provide the consent sync ID to the UMP SDK. If your app doesn't have a user identifier, use other identifiers to identify the user across apps, such as the Identifier for Vendor (IDFV).

Set the consent sync ID on the UMPConsentRequestParameters object:

Swift

let parameters = RequestParameters()
// Example using IDFV to identify the user across apps.
parameters.consentSyncID = UIDevice.current.identifierForVendor?.uuidString

Objective-C

UMPRequestParameters *parameters = [[UMPRequestParameters alloc] init];
// Example using IDFV to identify the user across apps.
parameters.consentSyncID = [[[UIDevice currentDevice] identifierForVendor] UUIDString];

The identifier you provide must uniquely identify the user across all of your apps where consent is being synced. Hash or encrypt the identifier to prevent sending personally identifiable information (PII) to Google.

The provided ID must meet the following requirements:

  • Constructed as a UUID string or matches regular expression ^[0-9a-zA-Z+.=\/_\-$,{}]{22,150}$.
  • A minimum of 22 characters.
  • A maximum of 150 characters.

The following are examples of correct consent sync IDs:

  • 12JD92JD8078S8J29SDOAKC0EF230337
  • 12jd92jd8078s8j29sdoakc0ef230337
  • 12Jd92jD8078s8j29sDoakc0ef230337
  • 123e4567-e89b-12d3-a456-426614174000

Failure to meet the requirements results in the consent sync ID not being set and the UMP SDK logging a warning to the console