API Reference

This page documents all methods available on the n360ortb object.

Methods Overview

Method
Description

Initialize the library with configuration

Request bids for ad slots

Set bid targeting on GPT slots

Get available targeting keys


n360ortb.init()

Initializes the n360ortb library with your configuration. Must be called before fetchBids().

Syntax

n360ortb.init(config)

Parameters

config (required)

Property
Required
Type
Description

currency

Yes

'EUR' | 'USD' | 'GBP'

Currency for bid values

bidTimeout

No

number

Auction timeout in milliseconds. Default: 3000

gdpr

No

object

GDPR/TCF configuration

gpp

No

object

GPP (Global Privacy Platform) configuration

usPrivacy

No

object

US Privacy (CCPA) configuration

schain

No

object

Supply chain object

config.gdpr

Property
Required
Type
Description

cmpTimeout

No

number

Time to wait for CMP response in milliseconds. Default: 50

config.gpp

Property
Required
Type
Description

cmpTimeout

No

number

Time to wait for GPP CMP response in milliseconds. Default: 50

config.usPrivacy

Property
Required
Type
Description

cmpTimeout

No

number

Time to wait for USP CMP response in milliseconds. Default: 50

config.schain

Property
Required
Type
Description

complete

Yes

1

Indicates if the chain is complete

ver

Yes

'1.0'

Schain version

nodes

Yes

array

Array of supply chain nodes

Example

TypeScript Definition


n360ortb.fetchBids()

Requests bids from Nexx360's server-side auction for the specified ad slots.

Syntax

Parameters

config (required)

Property
Required
Type
Description

slots

Yes

array

Array of slot configurations

timeout

No

number

Override auction timeout for this request

config.slots[]

Each slot can be configured using either a tagId or a placement:

Property
Required
Type
Description

divId

Yes

string

The DOM element ID where the ad will render

sizes

Yes

[number, number][]

Array of eligible sizes (width, height)

tagId

Conditional

string

Nexx360 tagId (use this OR placement)

placement

Conditional

string

Nexx360 placement code (use this OR tagId)

circle-info

Use either tagId or placement to identify your ad unit, not both. The tagId is available in the Nexx360 console.

callback (required)

Function called when the auction completes. Receives the bids object as its argument.

Callback Response

The callback receives a bids object with the following structure:

Example

TypeScript Definition


n360ortb.setDisplayBids()

Sets bid targeting values on Google Publisher Tag (GPT) ad slots. Call this method after fetchBids() completes and before calling googletag.pubads().refresh().

Syntax

Parameters

None.

Behavior

This method:

  1. Sets targeting key-value pairs on the corresponding GPT slots

  2. Registers an event listener on slotRenderEnded to clear targeting after each slot renders

Targeting Keys Set

Key
Description

n360_bid

Unique bid identifier

n360_pb

Price bucket for line item targeting

n360_sz

Ad size (e.g., "300x250")

n360_crid

Creative ID

n360_ssp

SSP identifier

Example


n360ortb.targetingKeys()

Returns an array of all targeting keys used by n360ortb.

Syntax

Parameters

None.

Returns

string[] - Array of targeting key names.

Example

Use Case

Use this method to clear n360ortb targeting from slots if needed:

Last updated

Was this helpful?