GDPR

Need to know

  • Before getting started with this section, make sure that you have read the Quick Guide on GDPR to understand the flow of events that you will be implementing below.
  • We added an additional field for publishers to send personal data. Publisher Partners must send any demographic or interest-based targeting data in the fields designated for such data, as described below. Publisher Partners must not include any personal data, including demographic or interest-based targeting data, in any fields intended for contextual targeting (i.e., targeting based on the content of the app).
  • As of SDK 5.0, if the user opened the application for the first time in any region outside of the European Economic Area, United Kingdom, and Switzerland, we will always treat the user as having consent.

Details

  • The consent dialog will not load if you attempt to call it for a user that MoPub has determined is outside of the European Economic Area, the United Kingdom, or Switzerland. Please keep this in mind when testing outside of those regions

  • The consent dialog will default to the user’s device language if it is set to Deutsch, English, Español, Français, Italiano, Nederlands, or Português. If the user’s device is not set to one of those 7 languages, the dialog will default to English. Additionally, the user will have the ability to select the dialog’s language. For more information on the consent dialog, see our FAQ.

Example

  1. Check if you should show the consent dialog:
     [MoPub sharedInstance].shouldShowConsentDialog
    
  2. Start loading the consent dialog. This call is a no-op if the user has opted out of ads personalization.
     [[MoPub sharedInstance] loadConsentDialogWithCompletion:^(NSError *error){
     // ...
     }];
    

    Note: Consent Dialogue will not load successfully if you are trying to request the dialogue when [MoPub sharedInstance].shouldShowConsentDialog is false.

  3. In loadConsentDialogWithCompletion’s completion block, show the consent dialog that the SDK has prepared for you.
    • If you choose to show the consent dialog at some point in the future, check if it is ready via isConsentDialogReady before showing it.
    • If your consent dialog fails to load, you will be given the error code, and you can choose to load it again later.
       [[MoPub sharedInstance] showConsentDialogFromViewController:<view_controller_reference_here> completion:nil]
      

Disclaimer

Only specific (managed) publishers who have been given permission are able to use their own consent dialog. If you attempt to use the API without approval, we will not collect personal data even for users that have provided consent. Please contact your account manager for further assistance.

As of 5.1+, publishers will be able to determine which users should be treated as GDPR compliant through the API [MoPub forceGDPRApplicable]. For additional details, check here.

Set the language

  1. Check if you should show the consent dialog:
     [MoPub sharedInstance].shouldShowConsentDialog
    
  2. Get the current vendor list link. You can optionally pass in a 2-character ISO 639-1 language String to have the information translated into 1 of the 7 available languages.
    - (NSURL * _Nullable)currentConsentVendorListUrl;
     // Or
    - (NSURL * _Nullable)currentConsentVendorListUrlWithISOLanguageCode:(NSString * _Nonnull)isoLanguageCode;
    
  3. Get the privacy policy link. You can optionally pass in a 2-character ISO 639-1 language String to have the information translated into 1 of the 7 available languages.
    - (NSURL * _Nullable)currentConsentPrivacyPolicyUrl;
     // Or
    - (NSURL * _Nullable)currentConsentPrivacyPolicyUrlWithISOLanguageCode:(NSString * _Nonnull)isoLanguageCode;
    
  4. Then, depending on whether the user has given consent, call one of the below methods to let the MoPub SDK know:
     // Call this to let MoPub know the user has granted consent
    - (void)grantConsent;
    
     // Call this to let MoPub know the user has revoked consent.
           - (void)revokeConsent;
    
  • (Optional) Below is a list of methods you could use in addition to the above APIs:
      // Get the current consent status. The possible statuses can be found in MPConsentStatus.h.
      @property (nonatomic, readonly) MPConsentStatus currentConsentStatus;
    
      // Additional getters for current/consented vendors and privacy policy. This list might change, so ensure you reference MoPub.h for the most recent APIs.
      @property (nonatomic, copy, readonly, nullable) NSString * previouslyConsentedVendorListVersion;
    
      @property (nonatomic, copy, readonly, nullable) NSString * previouslyConsentedPrivacyPolicyVersion;
    
      @property (nonatomic, copy, readonly, nullable) NSString * previouslyConsentedIabVendorListFormat;
    
      @property (nonatomic, copy, readonly, nullable) NSString * currentConsentVendorListVersion;
    
      @property (nonatomic, copy, readonly, nullable) NSString * currentConsentPrivacyPolicyVersion;
    
      @property (nonatomic, copy, readonly, nullable) NSString * currentConsentIabVendorListFormat;
    
      - (NSURL * _Nullable)currentConsentVendorListUrlWithISOLanguageCode:(NSString * _Nonnull)isoLanguageCode;
    
      - (NSURL * _Nullable)currentConsentPrivacyPolicyUrlWithISOLanguageCode:(NSString * _Nonnull)isoLanguageCode;
    

Best Practices

You have the option to use, [[MoPub sharedInstance] canCollectPersonalInfo], to determine whether the user has provided consent for MoPub and its partners to process personal data.

In order to identify if MoPub has determined that GDPR applies to the user, you have the option to call [MoPub isGDPRApplicable] once the SDK has been initialized. If you get back an MPBoolUnknown, ensure that the SDK has been initialized.

Keywords API

For purposes of GDPR compliance, if you are not on SDK version 5.0+. you should not target interest or demographic keywords in the European Economic Area, United Kingdom, and Switzerland. Additionally, MoPub will block interest and demographic keywords when the user does not have consent in these regions.

The MoPub SDK exposes an additional keyword API (userDataKeywords) for publishers to send demographic (e.g, age or gender) or interests data for ad targeting. You must send any demographic or interest-based targeting data in this field.

You can continue passing contextual keywords (i.e., targeting based on the content of the app) via the keywords API. You must not include any personal data, including demographic or interest-based targeting data, in this field.

You should not send MoPub any keywords in either field that violate the MoPub Policies for Publisher Partners.

Last updated June 14, 2018

TWITTER, MOPUB, and the Bird logo are trademarks of Twitter, Inc. or its affiliates. All third party logos and trademarks included are the property of their respective owners.

© 2018 MoPub Inc.