Requesting Consent from European Users

Under the Google EU User Consent Policy, you must make certain disclosures to your users in the European Economic Area (EEA) and obtain their consent to use cookies or other local storage, where legally required, and to use personal data (such as AdID) to serve ads. This policy reflects the requirements of the EU ePrivacy Directive and the General Data Protection Regulation (GDPR).

Ads served by Google can be categorized as personalized or non-personalized, both requiring consent from users in the EEA. By default, ad requests to Google serve personalized ads, with ad selection based on the user's previously collected data. Google also supports configuring ad requests to serve non-personalized ads. Learn more about personalized and non-personalized ads.

This guide describes how to forward consent to the Google Mobile Ads SDK once you have obtained consent.


The default behavior of the Google Mobile Ads SDK is to serve personalized ads. If a user has consented to receive only non-personalized ads, you can configure an AdRequest object with the following code to specify that only non-personalized ads should be requested:

AdRequest request = new AdRequest.Builder()
        .AddExtra("npa", "1")

If non-personalized ads are requested, the ad request URL currently includes &npa=1. However, note that this is an internal implementation detail of the Google Mobile Ads SDK and is subject to change.

Delay app measurement (optional)

By default, the Google Mobile Ads SDK initializes app measurement and begins sending user-level event data to Google immediately when the app starts. This initialization behavior ensures you can enable AdMob user metrics without making additional code changes.

However, if your app requires user consent before these events can be sent, you can delay app measurement until you explicitly initialize the Mobile Ads SDK or load an ad.

To delay app measurement for both Android and iOS in your Unity project, follow the steps for both platforms.


Add the following <meta-data> tag in the AndroidManifest.xml file in the Assets/Plugins/Android/GoogleMobileAdsPlugin directory of your Unity app.
        <!-- Delay app measurement until MobileAds.initialize() is called. -->


Open PListProcessor.cs in the Assets/GoogleMobileAds/Editor directory of your Unity app and add the following code to add the GADDelayAppMeasurementInit key into your Info.plist file.
public static void OnPostProcessBuild(BuildTarget buildTarget, string path)
    // Replace with your iOS AdMob app ID. Your AdMob app ID will look
    // similar to this sample ID: ca-app-pub-3940256099942544~1458002511
    string appId = "ADMOB_APPLICATION_ID";

    string plistPath = Path.Combine(path, "Info.plist");
    PlistDocument plist = new PlistDocument();

    plist.root.SetString("GADApplicationIdentifier", appId);
    plist.root.SetBoolean("GADDelayAppMeasurementInit", true);
    File.WriteAllText(plistPath, plist.WriteToString());

Mediation networks

Google currently is unable to obtain and handle consent for mediation networks, so you'll need to obtain and handle consent for each ad network separately. We are actively working with all of our open source and versioned mediation networks to provide updated documentation with details on how to forward consent. Documentation is already live for the following mediation networks:

Visszajelzés küldése a következővel kapcsolatban:

Segítségre van szüksége? Keresse fel súgóoldalunkat.