API Reference

n360tag.init()

n360tag.fetchBids()

n360tag.setDisplayBids()

n360tag.init(config:InitPayload)

Typescript Definition

export type Schain = {
  complete: 1,
  ver: '1.0',
  nodes: Array<{
    asi: string,
    sid: string,
    hp: number,
    rid?: string,
    name?: string,
    domain?: string,
  }>,
};

export type InitPayload = {
  gdpr?: {
    cmpTimeout?: number,
  }
  schain?: Schain,
  currency: 'EUR' | 'USD' | 'GBP',
  bidTimeout?: number,
};

initPayload

Property
Required
Type
Description

currency

Required

'EUR' | 'USD' | 'GBP'

Adserver currency

schain

Optional

Object

Schain object

gpdr

Optional

Object

GDPR object

bidTimeout

Optional

Number

fetchBids timeout in milliseconds. Default: 3000 ms

initPayload.gdpr

Property
Required
Type
Description

cmpTimeout

Optional

number

How long, in milliseconds, to wait for a CMP to respond. Default: 50ms

FetchBids(fetchBidsPayload, callback)

Typescript Definition

export type FetchBidsPayload = {
  slots: {
    divId: string,
    tagId: string,
    sizes: [number, number][],
  }[],
  timeout?: number,
}

Description

Property
Required
Type

fetchBidsPayload

Required

Object

fetchBids properties

callback

Required

function

Callback function

FetchBidsPayload

Property
Required
Type

slots

Required

Array of objects

Slots and sizes to run auctions for

timeout

Optional

number

Auction timeout

FetchBidsPayload.slots

Property
Required
Type

tagId

Required

string

Nexx360 tagId provided by our UI

divId

Required

string

Div id where ad will be displayed

sizes

Required

[number, number][]

Eligibles sizes for the auction

setDisplayBids()

This method will set the bid targeting on the googletag slots. An event listener will also be added to the slotRenderEnded event to clear the n360tag* targeting after each slot render.

Last updated