Page Summary
-
Two new APIs are introduced to align with Ad Manager settings for Programmatic limited ads and First party cookies for ads on web.
-
Using the new
disableLimitedAdsStorageAPI mirrors the "Programmatic limited ads" setting in Ad Manager to control local storage usage for limited ads. -
Utilizing the new
disableFirstPartyIdentifiersAPI mirrors the "First party cookies for ads on web" setting in Ad Manager to control the use of first-party identifiers for ad selection.
Limited ads lets apps serve ads when your users don't consent to share personal data. Limited ads mode stops the collection, sharing, and use of personal data for ad selection. If your users choose to not share personal data, this feature lets ads continue serving.
This guide covers using limited ads settings in your app, and matching app behavior with your Google Ad Manager network's global settings.
Configure client limited ads settings
PAL is updating how it handles settings to refine control over user
privacy and data usage. PAL version 1.90.0 introduces
the forceLimitedAds property and
deprecates the existing
allowStorage property. These properties are in the
ConsentSettings
class.
Starting in version 1.90.0, PAL reads Transparency and
Consent Framework (TCF) data from the device to determine user
consent for local storage. This change to reading TCF data makes the existing
allowStorage property redundant. Your app still must pass the gdpr= and
gdpr_consent= parameters in the ad tag URL.
If the automatic TCF-based determination is insufficient, directly set the
forceLimitedAds property in your app. For details, see
Publisher integration with the IAB Europe TCF.
Setting the forceLimitedAds property to a true value prevents PAL from
storing or sending user identifiers in the nonce sent to the server.
Setting the forceLimitedAds property to a true value is the same as
adding the ltd=1 parameter to the ad request URL in IMA (Interactive Media
Ads) SDKs. For details about limited ads, see
ltd (Limited ads).
When you set the forceLimitedAds property to a true value, PAL includes
ltd=1 parameter in the nonce.
To keep the current behavior in your app, you might need to update your
implementation, even if you did not set the allowStorage property before.
The existing allowStorage property defaults to a false value, which
enables limited ads. The forceLimitedAds property defaults to a false
value, which doesn't enable limited ads.
Update for Phase 1 of TCF determination
The PAL HTML5 Phase 1 release prepares you to transition from the
ConsentSettings.allowStorage property to automatic TCF-based
determination of limited ads.
During this transitional phase, PAL considers your user's TCF data,
the existing allowStorage property, and the latest forceLimitedAds property.
During this phase, you must always set the allowStorage property to a
true value to let PAL determine whether limited ads applies
based on the TCF data. If you want to enable limited ads regardless of
the TCF determination, set the forceLimitedAds property to a true value.
During Phase 1, PAL activates limited ads under any of the following circumstances:
allowStorageproperty is afalsevalue or unset. We don't recommended using this setting for theallowStorageproperty, as it is only to support apps that have not been updated.forceLimitedAdsproperty is atruevalue.- PAL detects that IAB (Interactive Advertising Bureau) TCF Purpose 1 consent is not granted.
The following table shows all possible states and whether limited ads is enabled:
| TCF purpose 1 consent | allowStorage property |
forceLimitedAds property |
Limited ads enabled |
|---|---|---|---|
| Granted | True | True | True |
| Not Granted | True | True | True |
| Granted | True | False (default) | False |
| Not Granted | True | False (default) | True |
| Granted | False (default) | True | True |
| Not Granted | False (default) | True | True |
| Granted | False (default) | False (default) | True |
| Not Granted | False (default) | False (default) | True |
Prepare for Phase 2 TCF determination
The Phase 2 release removes functionality from the allowStorage property. We
are planning the Phase 2 release 90 days after the Phase 1 releases,
estimated to March 10th, 2026. Prior to this date, you must update your
implementation to use the ConsentSettings.forceLimitedAds parameter.
For the Phase 2 release, PAL enables limited ads based solely on the absence
of TCF Purpose 1 consent and the optional ConsentSettings.forceLimitedAds
property:
| TCF Purpose 1 Consent | forceLimitedAds property |
limited ads Enabled |
|---|---|---|
| Granted | True | True |
| Not Granted | True | True |
| Granted | False (default) | False |
| Not Granted | False (default) | True |
Match Google Ad Manager global settings
If you update the Ad Manager settings Programmatic limited ads or First party cookies for ads on web, 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 cookies 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 cookies for ads on web 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 cookies and local storage for invalid traffic detection.
Handle user consent in your app
The following example handles user privacy and data usage in a PAL implementation:
const consentSettings = new goog.pal.ConsentSettings();
consentSettings.allowStorage = true;
// During the PAL Phase 1 release, best practice is to always set the
// `allowStorage` property to a `true` value to allow PAL to automatically
// determine whether limited ads applies based on the TCF data.
// To enable limited ads regardless of the TCF determination, set the
// `forceLimitedAds` property to a `true` value.
const adManagerSettings = new goog.pal.GoogleAdManagerSettings();
// Add this line if the "Programmatic limited ads" toggle is turned off in
// Ad Manager.
adManagerSettings.disableLimitedAdsStorage = true;
// Add this line if the "First party cookies for ads on web" toggle
// is turned off in Ad Manager.
adManagerSettings.disableFirstPartyIdentifiers = true;
const nonceLoader = new goog.pal.NonceLoader(consentSettings, adManagerSettings);