Оптимизируйте свои подборки
Сохраняйте и классифицируйте контент в соответствии со своими настройками.
В этом руководстве описаны шаги, необходимые для поддержки сообщения о нормативных актах штатов США в составе UMP SDK. Совместите эти инструкции с руководством «Начало работы» , в котором подробно описано, как запустить приложение с UMP SDK и настроить сообщение. Следующие инструкции относятся к сообщению о нормативных актах штатов США.
Предпосылки
Прежде чем продолжить, убедитесь, что вы выполнили следующее:
Обновите UMP SDK до последней версии. Для поддержки сообщений о нормативных актах США рекомендуем использовать версию 2.1.0 или выше.
Завершите «Начало работы» . Обязательно реализуйте точку входа для параметров конфиденциальности и отобразите её при необходимости. Выполнив это руководство, вы получите точку входа для передачи пользователям сообщений о соблюдении нормативных требований штатов США.
Если вы используете сообщение о правилах США вместе с другими сообщениями, ознакомьтесь с разделом Доступные типы сообщений для пользователей , чтобы понять, когда различные сообщения отображаются для ваших пользователей.
Установить тег для несовершеннолетних
Чтобы указать, достиг ли пользователь возраста согласия, установите setTagForUnderAgeOfConsent (TFUA). Если для параметра TFUA задано значение true , UMP SDK не будет запрашивать согласие пользователя. Если у вашего приложения смешанная аудитория, установите этот параметр для детей, чтобы гарантировать отсутствие запроса согласия. Вы несете ответственность за установку этого параметра в случаях, когда это необходимо для соблюдения COPPA и других соответствующих норм.
В следующем примере TFUA задается как true для запроса согласия UMP:
Ява
ConsentRequestParametersparams=newConsentRequestParameters.Builder()// Indicate the user is under age of consent..setTagForUnderAgeOfConsent(true).build();consentInformation=UserMessagingPlatform.getConsentInformation(this);consentInformation.requestConsentInfoUpdate(this,params,(OnConsentInfoUpdateSuccessListener)()->{// ...},(OnConsentInfoUpdateFailureListener)requestConsentError->{// ...});
Котлин
valparams=ConsentRequestParameters.Builder()// Indicate the user is under age of consent..setTagForUnderAgeOfConsent(true).build()consentInformation=UserMessagingPlatform.getConsentInformation(this)consentInformation.requestConsentInfoUpdate(this,params,ConsentInformation.OnConsentInfoUpdateSuccessListener{// ...},ConsentInformation.OnConsentInfoUpdateFailureListener{requestConsentError->
// ...})
Прочитать варианты согласия
После того, как пользователь принял решение о соответствии требованиям законодательства США, вы можете прочитать его выбор из локального хранилища в соответствии со спецификацией Глобальной платформы конфиденциальности (GPP). Подробнее см. в разделе «Сведения о приложении» . Обратите внимание, что UMP SDK заполняет только ключи IABGPP_GppSID и IABGPP_HDR_GppString .
Проверьте сообщения о правилах штатов США
Для тестирования сообщений о нормативных актах штатов США используйте debugGeographyUMPDebugGeographyRegulatedUSState , чтобы заставить UMP SDK обрабатывать ваше тестовое устройство так, как если бы оно находилось в регулируемом штате США. Вы также можете использовать UMPDebugGeographyOther для принудительного подавления сообщений о нормативных актах штатов США. Подробнее о debugGeography см. в разделе Принудительное определение географического положения .
[null,null,["Последнее обновление: 2025-08-29 UTC."],[[["\u003cp\u003eThis guide provides instructions on integrating the US States regulations message within your Android app using the UMP SDK (version 2.1.0 or higher).\u003c/p\u003e\n"],["\u003cp\u003eBefore starting, ensure you have updated the UMP SDK, completed the 'Get Started' guide, created a US State regulations message in Ad Manager, and reviewed the available message types for potential interactions.\u003c/p\u003e\n"],["\u003cp\u003eYou can set a TagForUnderAgeOfConsent (TFUA) to indicate users under the age of consent and prevent consent requests for them, aligning with COPPA and other regulations.\u003c/p\u003e\n"],["\u003cp\u003eAfter a user interacts with the message, their choices are stored locally, accessible through the IABGPP_GppSID and IABGPP_HDR_GppString keys as per the Global Privacy Platform (GPP) specifications.\u003c/p\u003e\n"],["\u003cp\u003eTo test your implementation, utilize the \u003ccode\u003eUMPDebugGeographyRegulatedUSState\u003c/code\u003e debugGeography (UMP version 3.1.0 or higher) to simulate a device location within a regulated US state or \u003ccode\u003eUMPDebugGeographyOther\u003c/code\u003e to suppress the message.\u003c/p\u003e\n"]]],[],null,["# US IAB Support\n\nThis guide outlines the steps required to support the US states regulations\nmessage as part of the UMP SDK. Pair these instructions with\n[Get started](/interactive-media-ads/docs/sdks/android/client-side/privacy), which details how to get your app running\nwith the UMP SDK and set up your message. The following guidance is specific to\nthe US states regulations message.\n\nPrerequisites\n-------------\n\nBefore continuing, ensure you do the following:\n\n- Update to the latest version of the UMP SDK. For US states regulations messaging support, we recommend you to use version 2.1.0 or higher.\n- Complete [Get started](/interactive-media-ads/docs/sdks/android/client-side/privacy). Be sure to implement a privacy options entrypoint and render it if required. By completing this guide, you have an entrypoint to serve your US states regulations message to your users.\n- [Create a US state regulations message](//support.google.com/admanager/answer/10115735) for apps.\n- If you're using the US states regulations message alongside other messages, consult [Available user message types](//support.google.com/admanager/answer/10075998) to understand when different messages are displayed to your users.\n\nSet the tag for under age of consent\n------------------------------------\n\nTo indicate whether a user is under the age of consent, set\n`\n`[setTagForUnderAgeOfConsent](/admob/android/privacy/api/reference/com/google/android/ump/ConsentRequestParameters.Builder#public-consentrequestparameters.builder-settagforunderageofconsent-boolean-tagforunderageofconsent) (TFUA). When you set TFUA to `true`, the UMP SDK\ndoesn't request consent from the user. If your app has a mixed audience, set\nthis parameter for child users to ensure consent is not requested.\nIt is your\nresponsibility for setting this parameter where necessary to comply with COPPA\nand other relevant regulations.\n| **Important:** The UMP SDK does not forward the TFUA tag set on consent requests to the Google Mobile Ads SDK. You must explicitly set the `tagForUnderAgeOfConsent` or `tagForChildDirectectedTreatment` on ad requests. If you don't set the `tagForUnderAgeOfConsent` or `tagForChildDirectectedTreatment` on ad requests, the UMP SDK does not collect any information that allows Google to determine whether or not users under the age of consent use your app. For more information about data processing restrictions for these users, see\n\nThe following example sets TFUA to true on a UMP consent request: \n\n### Java\n\n ConsentRequestParameters params = new ConsentRequestParameters\n .Builder()\n // Indicate the user is under age of consent.\n .setTagForUnderAgeOfConsent(true)\n .build();\n\n consentInformation = UserMessagingPlatform.getConsentInformation(this);\n consentInformation.requestConsentInfoUpdate(\n this,\n params,\n (OnConsentInfoUpdateSuccessListener) () -\u003e {\n // ...\n },\n (OnConsentInfoUpdateFailureListener) requestConsentError -\u003e {\n // ...\n });\n\n### Kotlin\n\n val params = ConsentRequestParameters\n .Builder()\n // Indicate the user is under age of consent.\n .setTagForUnderAgeOfConsent(true)\n .build()\n\n consentInformation = UserMessagingPlatform.getConsentInformation(this)\n consentInformation.requestConsentInfoUpdate(\n this,\n params,\n ConsentInformation.OnConsentInfoUpdateSuccessListener {\n // ...\n },\n ConsentInformation.OnConsentInfoUpdateFailureListener {\n requestConsentError -\u003e\n // ...\n })\n\nRead consent choices\n--------------------\n\nAfter the user has made a US states regulations decision, you can read\ntheir choice from local storage following the Global Privacy Platform (GPP)\nspec. For more details see,\n[In-App Details](https://github.com/InteractiveAdvertisingBureau/Global-Privacy-Platform/blob/main/Core/CMP%20API%20Specification.md#in-app-details).\nNote that the UMP SDK only populates the `IABGPP_GppSID` and\n`IABGPP_HDR_GppString` keys.\n\nTest your US states regulations messaging\n-----------------------------------------\n\nTo test your US states regulations messaging, use the\n`UMPDebugGeographyRegulatedUSState` `debugGeography` to force the UMP\nSDK to treat your test device as if the device were located in a regulated US\nstate. You can also use `UMPDebugGeographyOther` to force suppression of US\nstates regulations messages. For more details on `debugGeography`, see\n[Force a geography](/interactive-media-ads/docs/sdks/android/client-side/privacy#force_a_geography).\n| **Note:** `UMPDebugGeographyRegulatedUSState` is only available in UMP version 3.1.0 or higher."]]