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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 UTC."],[[["\u003cp\u003e\u003ccode\u003eGoogleMobileAds.Api.RequestConfiguration\u003c/code\u003e provides global settings applied to every ad request made within your app.\u003c/p\u003e\n"],["\u003cp\u003eIt allows you to control aspects like content rating, user privacy, and COPPA settings for ad targeting.\u003c/p\u003e\n"],["\u003cp\u003eYou can specify test device IDs to consistently receive test ads during development.\u003c/p\u003e\n"],["\u003cp\u003eThis configuration is essential for ensuring your ad requests align with privacy regulations and your app's target audience.\u003c/p\u003e\n"]]],["The `RequestConfiguration` manages global settings for all `AdRequest` instances. Key actions include setting the maximum ad content rating, enabling the publisher first-party ID, and defining the personalization treatment for ad requests. It also handles COPPA compliance and treatment for users under the age of consent in the EEA. Additionally, it allows for setting specific device IDs to consistently receive test ads. Constructors facilitate creating new instances, or cloning existing configurations.\n"],null,["GoogleMobileAds.Api.RequestConfiguration\n\nGlobal configuration used for every [AdRequest](/admob/unity/reference/class/google-mobile-ads/api/ad-request#class_google_mobile_ads_1_1_api_1_1_ad_request).\n\nSummary\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](/admob/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](/admob/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](/admob/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](/admob/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](/admob/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\nMaxAdContentRating \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\nPublisherFirstPartyIdEnabled \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()](/admob/unity/reference/class/google-mobile-ads/api/mobile-ads#class_google_mobile_ads_1_1_api_1_1_mobile_ads_1a6bede723fff4ce9b21c8ff32ec3324f5) is called. \n\nPublisherPrivacyPersonalizationState \n\n```c#\nPublisherPrivacyPersonalizationState PublisherPrivacyPersonalizationState\n``` \nThis property lets you specify the personalization treatment that applies to subsequent ad requests. \n\nTagForChildDirectedTreatment \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\nTagForUnderAgeOfConsent \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\nTestDeviceIds \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\nRequestConfiguration \n\n```c#\n RequestConfiguration()\n``` \n\nRequestConfiguration \n\n```c#\n RequestConfiguration(\n RequestConfiguration requestConfiguration\n)\n```"]]