Class: NonceLoader

  • NonceLoader is a programmatic access library that helps publishers gather signals to access AdX demand.

  • Publishers need to create a NonceLoader instance upon page load and utilize its methods to generate and manage nonces for ad requests.

  • Nonces, obtained via NonceManager, enhance ad requests by carrying pre-bid information through the "&paln" URL parameter.

  • Publishers are expected to use NonceManager methods to signal ad clicks and impressions for tracking purposes.

Constructor

NonceLoader

new NonceLoader(consentSettings, googleAdManagerSettings)

Constructor.

Parameter

consentSettings

Optional

Settings related to regulations and consent.

googleAdManagerSettings

Optional

PAL settings that reflect the settings you configured in the Google Ad Manager UI.

Value must not be null.

Method

loadNonceManager

public

loadNonceManager(request) returns Promise containing non-null NonceManager

Parameter

request

NonceRequest

The request containing information about the nonce being requested.

Value must not be null.

Returns

non-null Promise containing non-null NonceManager The promise that will be resolved once the NonceManager with an encrypted nonce containing all pre-bid information is available.