The programmatic access library lets publishers collect signals to unlock Ad Exchange demand. Create a `NonceLoader` instance on page load to reduce latency. For each stream (for DAI) or individual ad request, call the relevant setters as needed followed by a call to the `loadNonceManager` method. You can then call the `NonceManager.getNonce()` method to get the string to add to ad requests as the value to the `"&paln"` URL parameter. Call the `NonceManager.sendAdClick()` and `NonceManager.sendAdImpression()` methods based on user interactions.

| Constructors ||
|---|---|
| `https://developers.google.com/ad-manager/pal/cast/reference/class/goog.cast.pal.NonceLoader#goog.cast.pal.NonceLoader.constructor` | Constructor. |

| Methods ||
|---|---|
| `https://developers.google.com/ad-manager/pal/cast/reference/class/goog.cast.pal.NonceLoader#goog.cast.pal.NonceLoader.loadNonceManager` |   |

## Constructors

*** ** * ** ***

### constructor

`new NonceLoader(consentSettings?: https://developers.google.com/ad-manager/pal/cast/reference/class/goog.cast.pal.ConsentSettings): https://developers.google.com/ad-manager/pal/cast/reference/class/goog.cast.pal.NonceLoader` Constructor.

| Parameters ||
|---|---|
| `` `Optional` consentSettings: https://developers.google.com/ad-manager/pal/cast/reference/class/goog.cast.pal.ConsentSettings `` | Settings related to regulations and consent. |

| Returns ||
|---|---|
| `https://developers.google.com/ad-manager/pal/cast/reference/class/goog.cast.pal.NonceLoader` |   |

## Methods

*** ** * ** ***

### loadNonceManager

`loadNonceManager(request: https://developers.google.com/ad-manager/pal/cast/reference/class/goog.cast.pal.NonceRequest): Promise<https://developers.google.com/ad-manager/pal/cast/reference/interface/goog.cast.pal.NonceManager>`

| Parameters ||
|---|---|
| `request: https://developers.google.com/ad-manager/pal/cast/reference/class/goog.cast.pal.NonceRequest` | The request containing information about the nonce being requested. |

| Returns ||
|---|---|
| `Promise<https://developers.google.com/ad-manager/pal/cast/reference/interface/goog.cast.pal.NonceManager>` | The promise that resolves when the NonceManager with an encrypted nonce containing all pre-bid information is available. |