Limited ads and first party identifier settings

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:

PALSettings *settings = [[PALSettings alloc] init];
settings.allowStorage = YES;
settings.directedForChildOrUnknownAge = NO;

PALGoogleAdManagerSettings *adManagerSettings = [[PALGoogleAdManagerSettings alloc] init];
// Add this line if the "Programmatic limited ads" toggle is turned off in
// Ad Manager.
adManagerSettings.disableLimitedAdsStorage = YES;
// Add this line if the "First party identifiers for ads on app" toggle
// is turned off in Ad Manager.
adManagerSettings.disableFirstPartyIdentifiers = YES;

self.nonceLoader = [[PALNonceLoader alloc] initWithSettings:settings
                                    googleAdManagerSettings:adManagerSettings];