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).

Check for GDPR applicability

If we detect that a user opened a given application for the first time in the European Economic Area, United Kingdom, or Switzerland, as determined by the user’s truncated IP address, MoPub will consider GDPR applying to that user for the lifetime of that application, meaning that MoPub requires the user’s consent before serving personalized ads. This version of the SDK does not currently support consent from users located outside of where we have determined GDPR applies and you should not pass consent state for users outside of these regions. If you are passing a consent state for users that MoPub has determined are located outside of the Europoean Econimc Area, the United Kingdom, or Switzerland, MoPub will disregard the consent state, as the SDK will not treat GDPR as applying to users outside of these regions, and we will continue to process their personal data.

Once the SDK has been initialized, call MoPub.IsGdprApplicable. You will get back a bool indicating whether GDPR applies to the user.

  • If GDPR applies, proceed to ask your user for an explicit consent. You can collect the consent from your users using either of the options below.
  • If you get an unknown answer, ensure that the SDK has been initialized.

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.ShouldShowConsentDialog { get }
    
  2. Start loading the consent dialog. This call is no-op if the user has opted out of ads personalization.
      MoPub.LoadConsentDialog();
    

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

  3. If you have subscribed to listen to events, in the OnConsentDialogLoadedEvent callback, 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 IsConsentDialogLoaded before showing it.
    • If your consent dialog fails to load, you will be notified via OnConsentDialogFailedEvent() with the error code, at which point you can choose to load it again later.
      // Subscribe to event
       MoPubManager.OnConsentDialogLoadedEvent += OnConsentDialogLoaded;
      
       void OnConsentDialogLoaded() {
           MoPub.ShowConsentDialog();
       }
      

SDK v 5.0 does not currently support consent from users located outside of where we have determined GDPR applies and you should not pass consent state for users outside of these regions. If you are passing a consent state for users that MoPub has determined are located outside of the Europoean Econimc Area, the United Kingdom, or Switzerland, MoPub will disregard the consent state, as the SDK will not treat GDPR as applying to users outside of these regions, and we will continue to process their personal data.

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 collecting 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 ForceGdprApplicable. For additional details, check here.

Set the language

  1. You can optionally set a language of choice (a 2-character ISO 639-1 String) for your vendor list and privacy policy when constructing your consent dialog, like so:
      MoPub.ConsentLanguageCode = "en";
    
  2. Access this to get the current vendor list link:
      Uri url = MoPub.PartnerApi.CurrentVendorListUrl;
    
  3. Access this to get the current privacy policy link:
      Uri url = MoPub.PartnerApi.CurrentConsentPrivacyPolicyUrl;
    
  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
     MoPub.PartnerApi.GrantConsent();
    
     // Call this to let MoPub know the user has revoked consent.
     MoPub.PartnerApi.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 the MoPub.Consent.Status enum
    MoPub.Consent.Status MoPub.CurrentConsentStatus { get }
    
    // Listen to the consent status change. You will have access to the old status, the new status, and a boolean for whether you can continue to collect personal information
    MoPubEventListener.OnConsentStatusChanged(oldStatus, newStatus, canCollectPii)
    
    // Additional methods for current/consented vendors and privacy policy. Always reference `PartnerApi` for the most recent APIs.
    string MoPub.PartnerApi.CurrentConsentIabVendorListFormat { get }
    string MoPub.PartnerApi.CurrentConsentPrivacyPolicyVersion { get }
    string MoPub.PartnerApi.CurrentConsentVendorListVersion { get }
    string MoPub.PartnerApi.PreviouslyConsentedIabVendorListFormat { get }
    string MoPub.PartnerApi.PreviouslyConsentedPrivacyPolicyVersion { get }
    string MoPub.PartnerApi.PreviouslyConsentedVendorListVersion { get }
    

Best Practices

You have the option to use, MoPub.CanCollectPersonalInfo to determine whether the user has provided consent for MoPub and its partners to process personal data. If you are using MoPub mediation, adapters have already been modified to let the mediated SDKs know whether they, too, can collect and process users’ personal data.

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.