Limited ads and first party identifier settings
Stay organized with collections
Save and categorize content based on your preferences.
If you update the Ad Manager settings Programmatic limited ads or
First party
identifiers
for ads on
apps,
use these new APIs to match the settings in Ad Manager. If you don't use the
APIs PAL might include the identifiers in the nonce that is used in the ad
request to the server. However, Ad Manager might drop the signals based on the
settings in Ad Manager.
The APIs are as follows:
disableLimitedAdsStorage
-
disables invalid traffic detection-only
identifiers
and use of local storage for limited ads. If you updated the
Programmatic limited ads setting in Ad Manager within
Admin > Global settings, use this API to disable usage of local storage
for limited ads in PAL. Note that this setting does not apply to non-limited
ads.
disableFirstPartyIdentifiers
-
disables first-party identifiers used for ad selection. If you updated the
First party
identifiers
for ads on
apps
setting in Ad Manager within Admin > Global settings, use this API to
disable such identifiers in PAL. Note that this setting does not apply to the
use of identifiers and
local storage for invalid traffic detection.
The following example sets these parameters:
ConsentSettings consentSettings = ConsentSettings.builder()
.allowStorage(isConsentToStorage)
.build();
GoogleAdManagerSettings adManagerSettings = GoogleAdManagerSettings.builder()
// Add this line if the "Programmatic limited ads" toggle is turned
// off in Ad Manager.
.disableLimitedAdsStorage(true)
// Add this line if the
// "First party identifiers for ads on app" toggle is turned
// off in Ad Manager.
.disableFirstPartyIdentifiers(true)
.build();
nonceLoader = new NonceLoader(this, consentSettings, adManagerSettings);
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."],[],[],null,["# Limited ads and first party identifier settings\n\nIf you update the Ad Manager settings **Programmatic limited ads** or\n**First party\nidentifiers\nfor ads on\napps**,\nuse these new APIs to match the settings in Ad Manager. If you don't use the\nAPIs PAL might include the identifiers in the nonce that is used in the ad\nrequest to the server. However, Ad Manager might drop the signals based on the\nsettings in Ad Manager.\n\nThe APIs are as follows:\n\n- [`disableLimitedAdsStorage`](/ad-manager/pal/android/api/com/google/ads/interactivemedia/pal/GoogleAdManagerSettings.Builder#public-abstract-googleadmanagersettings.builder-disablelimitedadsstorage-boolean-toggle) - disables invalid traffic detection-only identifiers and use of local storage for limited ads. If you updated the **Programmatic limited ads** setting in Ad Manager within **Admin \\\u003e Global settings**, use this API to disable usage of local storage for limited ads in PAL. Note that this setting does not apply to non-limited ads.\n- [`disableFirstPartyIdentifiers`](/ad-manager/pal/android/api/com/google/ads/interactivemedia/pal/GoogleAdManagerSettings.Builder#public-abstract-googleadmanagersettings.builder-disablefirstpartyidentifiers-boolean-toggle) - disables first-party identifiers used for ad selection. If you updated the **First party\n identifiers\n for ads on\n apps** setting in Ad Manager within **Admin \\\u003e Global** settings, use this API to disable such identifiers in PAL. Note that this setting does not apply to the use of identifiers and local storage for invalid traffic detection.\n\nThe following example sets these parameters: \n\n ConsentSettings consentSettings = ConsentSettings.builder()\n .allowStorage(isConsentToStorage)\n .build();\n\n GoogleAdManagerSettings adManagerSettings = GoogleAdManagerSettings.builder()\n // Add this line if the \"Programmatic limited ads\" toggle is turned\n // off in Ad Manager.\n .disableLimitedAdsStorage(true)\n // Add this line if the\n // \"First party identifiers for ads on app\" toggle is turned\n // off in Ad Manager.\n .disableFirstPartyIdentifiers(true)\n .build();\n\n nonceLoader = new NonceLoader(this, consentSettings, adManagerSettings);"]]