Stay organized with collections
Save and categorize content based on your preferences.
GoogleMobileAds.Api.RequestConfiguration
Global configuration used for every AdRequest.
Summary
Public attributes
MaxAdContentRating
MaxAdContentRating MaxAdContentRating
A maximum ad content rating.
AdMob ads returned for these requests have a content rating at or below the level set.
PublisherFirstPartyIdEnabled
bool PublisherFirstPartyIdEnabled
Controls whether the Google Mobile Ads SDK publisher first-party ID, formerly known as the same app key, is enabled.
The value set persists across app sessions once MobileAds.SetRequestConfiguration() is called.
PublisherPrivacyPersonalizationState
PublisherPrivacyPersonalizationState PublisherPrivacyPersonalizationState
This property lets you specify the personalization treatment that applies to subsequent ad requests.
TagForChildDirectedTreatment
TagForChildDirectedTreatment TagForChildDirectedTreatment
This property allows you to specify whether you would like your app to be treated as child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA) - http://business.ftc.gov/privacy-and-security/childrens-privacy
.
If you set this property to True, you will indicate that your app should be treated as child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA).
If you set this property to False, you will indicate that your app should not be treated as child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA).
If you do not set this property, or set this method to Unspecified ad requests will include no indication of how you would like your app treated with respect to COPPA.
By using this property, you certify that this notification is accurate and you are authorized to act on behalf of the owner of the app. You understand that abuse of this setting may result in termination of your Google account.
Note: it may take some time for this designation to be fully implemented in applicable Google services.
TagForUnderAgeOfConsent
TagForUnderAgeOfConsent TagForUnderAgeOfConsent
Indicates the publisher specified that the ad request should receive treatment for users in the European Economic Area (EEA) under the age of consent.
TestDeviceIds
List< string > TestDeviceIds = new List()
The test device IDs corresponding to test device that will always request test ads.
Returns an empty list if test device IDs were not previously set.
Public functions
RequestConfiguration
RequestConfiguration()
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[null,null,["Last updated 2025-08-20 UTC."],[[["\u003cp\u003e\u003ccode\u003eRequestConfiguration\u003c/code\u003e is a global configuration applied to every ad request in the Google Mobile Ads SDK.\u003c/p\u003e\n"],["\u003cp\u003eIt allows publishers to set parameters such as maximum ad content rating, child-directed treatment, and test device IDs.\u003c/p\u003e\n"],["\u003cp\u003eThese settings influence the types of ads served to users and help ensure compliance with regulations like COPPA.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eRequestConfiguration\u003c/code\u003e can be customized using a builder pattern and persists across app sessions.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can utilize this class to control ad targeting and content within their Unity applications.\u003c/p\u003e\n"]]],["The `RequestConfiguration` manages global settings for all `AdRequest`s. Key attributes include: `MaxAdContentRating` to set the highest acceptable ad content rating; `PublisherFirstPartyIdEnabled` to manage first-party ID usage; `PublisherPrivacyPersonalizationState` for ad personalization. Additionally, `TagForChildDirectedTreatment` specifies COPPA compliance, `TagForUnderAgeOfConsent` handles EEA age of consent, and `TestDeviceIds` lists devices that receive test ads. Two constructors are provided to create new instances.\n"],null,["# GoogleMobileAds.Api.RequestConfiguration Class Reference\n\nGoogleMobileAds.Api.RequestConfiguration\n========================================\n\nGlobal configuration used for every [AdRequest](/ad-manager/mobile-ads-sdk/unity/reference/class/google-mobile-ads/api/ad-request#class_google_mobile_ads_1_1_api_1_1_ad_request).\n\nSummary\n-------\n\n| ### Constructors and Destructors ||\n|---|---|\n| [RequestConfiguration](#class_google_mobile_ads_1_1_api_1_1_request_configuration_1a3eacf5c38e6176f32f11d11e4ee69c28)`()` ||\n| [RequestConfiguration](#class_google_mobile_ads_1_1_api_1_1_request_configuration_1a410cdea94a2e7248afa68c20b41afc43)`(`[RequestConfiguration](/ad-manager/mobile-ads-sdk/unity/reference/class/google-mobile-ads/api/request-configuration#class_google_mobile_ads_1_1_api_1_1_request_configuration)` requestConfiguration)` ||\n\n| ### Public attributes ||\n|---------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [MaxAdContentRating](#class_google_mobile_ads_1_1_api_1_1_request_configuration_1a496ce8a625dde7f98caedd5a3a2701d1) | [MaxAdContentRating](/ad-manager/mobile-ads-sdk/unity/reference/class/google-mobile-ads/api/max-ad-content-rating#class_google_mobile_ads_1_1_api_1_1_max_ad_content_rating) A maximum ad content rating. |\n| [PublisherFirstPartyIdEnabled](#class_google_mobile_ads_1_1_api_1_1_request_configuration_1a65b5a2706ab9cd46fdbb16f6a1335ef8) | `bool` Controls whether the Google Mobile Ads SDK publisher first-party ID, formerly known as the same app key, is enabled. |\n| [PublisherPrivacyPersonalizationState](#class_google_mobile_ads_1_1_api_1_1_request_configuration_1aa208e4d390f23bf8c862ab3b06ee3ec3) | [PublisherPrivacyPersonalizationState](/ad-manager/mobile-ads-sdk/unity/reference/namespace/google-mobile-ads/api#namespace_google_mobile_ads_1_1_api_1a1e90d8750ed117fee66f6294d0d4bcc1) This property lets you specify the personalization treatment that applies to subsequent ad requests. |\n| [TagForChildDirectedTreatment](#class_google_mobile_ads_1_1_api_1_1_request_configuration_1a4408b16a6fe4f1d4142f3f6e241acdee) | [TagForChildDirectedTreatment](/ad-manager/mobile-ads-sdk/unity/reference/namespace/google-mobile-ads/api#namespace_google_mobile_ads_1_1_api_1a720208a888e53eaa0b1ec5ca48df9241) This property allows you to specify whether you would like your app to be treated as child-directed for purposes of the Children's Online Privacy Protection Act (COPPA) - \u003chttp://business.ftc.gov/privacy-and-security/childrens-privacy\u003e . |\n| [TagForUnderAgeOfConsent](#class_google_mobile_ads_1_1_api_1_1_request_configuration_1a5112d78327dc3c7cc2eb85b6e3dfa121) | [TagForUnderAgeOfConsent](/ad-manager/mobile-ads-sdk/unity/reference/namespace/google-mobile-ads/api#namespace_google_mobile_ads_1_1_api_1a79e0d49fd715bd7cedeaa7bcb72cdd0c) Indicates the publisher specified that the ad request should receive treatment for users in the European Economic Area (EEA) under the age of consent. |\n| [TestDeviceIds](#class_google_mobile_ads_1_1_api_1_1_request_configuration_1a3728fd66952b7b215d983e6af65d2be8)` = new List`() | `List\u003c string \u003e` The test device IDs corresponding to test device that will always request test ads. |\n\nPublic attributes\n-----------------\n\n### MaxAdContentRating\n\n```c#\nMaxAdContentRating MaxAdContentRating\n``` \nA maximum ad content rating.\n\nAdMob ads returned for these requests have a content rating at or below the level set. \n\n### PublisherFirstPartyIdEnabled\n\n```c#\nbool PublisherFirstPartyIdEnabled\n``` \nControls whether the Google Mobile Ads SDK publisher first-party ID, formerly known as the same app key, is enabled.\n\nThe value set persists across app sessions once [MobileAds.SetRequestConfiguration()](/ad-manager/mobile-ads-sdk/unity/reference/class/google-mobile-ads/api/mobile-ads#class_google_mobile_ads_1_1_api_1_1_mobile_ads_1a6bede723fff4ce9b21c8ff32ec3324f5) is called. \n\n### PublisherPrivacyPersonalizationState\n\n```c#\nPublisherPrivacyPersonalizationState PublisherPrivacyPersonalizationState\n``` \nThis property lets you specify the personalization treatment that applies to subsequent ad requests. \n\n### TagForChildDirectedTreatment\n\n```c#\nTagForChildDirectedTreatment TagForChildDirectedTreatment\n``` \nThis property allows you to specify whether you would like your app to be treated as child-directed for purposes of the Children's Online Privacy Protection Act (COPPA) - \u003chttp://business.ftc.gov/privacy-and-security/childrens-privacy\u003e\n\n.\n\nIf you set this property to True, you will indicate that your app should be treated as child-directed for purposes of the Children's Online Privacy Protection Act (COPPA).\n\nIf you set this property to False, you will indicate that your app should not be treated as child-directed for purposes of the Children's Online Privacy Protection Act (COPPA).\n\nIf you do not set this property, or set this method to Unspecified ad requests will include no indication of how you would like your app treated with respect to COPPA.\n\nBy using this property, you certify that this notification is accurate and you are authorized to act on behalf of the owner of the app. You understand that abuse of this setting may result in termination of your Google account.\n\nNote: it may take some time for this designation to be fully implemented in applicable Google services. \n\n### TagForUnderAgeOfConsent\n\n```c#\nTagForUnderAgeOfConsent TagForUnderAgeOfConsent\n``` \nIndicates the publisher specified that the ad request should receive treatment for users in the European Economic Area (EEA) under the age of consent. \n\n### TestDeviceIds\n\n```c#\nList\u003c string \u003e TestDeviceIds = new List()\n``` \nThe test device IDs corresponding to test device that will always request test ads.\n\nReturns an empty list if test device IDs were not previously set.\n\nPublic functions\n----------------\n\n### RequestConfiguration\n\n```c#\n RequestConfiguration()\n``` \n\n### RequestConfiguration\n\n```c#\n RequestConfiguration(\n RequestConfiguration requestConfiguration\n)\n```"]]