Skip to main content
Full reference for all configuration options available when initializing AdXensor via the npm package.

AdXensorConfig

Pass these options to AdXensor.getInstance(config) or new AdXensor(config):

Example

SlotOptions

Options you can pass to adx.fill(), adx.defineSlot(), or adx.push():

CDN script attributes

When using the CDN snippet, pass options as data attributes on the <script> tag:

Singleton pattern

The SDK uses a singleton: multiple calls to AdXensor.getInstance() with the same config return the same instance. The first call creates it; subsequent calls reuse it.

Resetting (SPA navigation)

To destroy the current instance and allow re-initialization (useful after client-side route changes):
Or just destroy without clearing the singleton reference: