Comment on page
Integration with Xandr adserver
Nexx Web tag is compatible with Xandr adserver.
The tag below will replace your APN Tag, that will be embedded into it to establish connexion with your Xandr account.
The integration, its characteristics and options are described below.
<head>
<script async src="//cdn.nexx360.io/loader.js"></script>
<script>
var n360Ad = n360Ad || { que: []};
var apntag = apntag || { anq: []};
apntag.anq.push(() => {
apntag.setPageOpts({
member: ENTER YOUR MEMBER ID,
keywords: { key1: 'value1' }
})
n360Ad.que.push(function(){
n360Ad.setConfig({
account: 'ENTER YOUR CUSTOMER ID',
gdpr: 1,
adServer: 'xandr',
granularity: 'auto',
ids: {
id5: { partnerId: ENTER YOUR CUSTOMER ID },
},
targeting: {
key1: 'value1',
key2: ['value1', 'value2']
},
lazyLoading: {
isActive: 1,
fetchRatio: 2,
mobileFetchRatio: 4,
},
amazon: {
isActive: 1,
pubId: 'ENTER YOUR AMAZON PUB ID'
}
});
n360Ad.defineXandrSlot({
invCode: "ENTER YOUR INVENTORY CODE",
sizes: [[320, 50], [728, 90], [1000, 90], [1000, 200], [1200, 90], [1200, 200], [1800, 1000], [1, 1]],
targetId: "div-1",
keywords: {'key2': ['value1', 'value2'] }
})
.setNexx360TagId('ENTER YOUR PLACEMENT ID')
.setLabel('banner');
n360Ad.defineXandrSlot({
invCode: "ENTER YOUR INVENTORY CODE",
sizes: [[300, 250], [300, 600]],
targetId: "div-2"
})
.setNexx360TagId('ENTER YOUR PLACEMENT ID')
.setLabel('mpu1');
n360Ad.defineXandrSlot({
invCode: "ENTER YOUR INVENTORY CODE",
sizes: [[300, 250]],
targetId: "div-3"
})
.setNexx360TagId('ENTER YOUR PLACEMENT ID')
.setLabel('incontent')
.setTeadsPageId('ENTER YOUR TEADS PAGE ID')
.setTeadsPlacementId('ENTER YOUR TEADS PLACEMENT ID');
n360Ad.loadTags();
});
</script>
</head>
Then, you need to indicate where the ad unit will appear by integrating the following code in the
<body>
at the selected location. The corresponding code must be added for each ad slot defined in the <head>
. <body>
<div id="div-1"></div>
<script>
apntag.anq.push(function() {
apntag.showTag('div-1');
});
</script>
</body>
Check that your div ID matches to the ID indicated during the ad slot definition.
The corresponding code must be added for each ad placement defined in the
<head>
.Nexx Web tag needs to be configured with the fields described below at three levels:
apntag.setPageOpts
:member
: Xandr member IDkeywords
: values enabling to define customised attributes for the page. They are used for targeting and reporting in Xandr.
n360Ad.setConfig
:account
: Nexx360 customer ID indicated at the right top of the consolegdpr
: 1 or 0 according to the CMP set up, active or notadServer
: specify 'xandr' for implementation with this adservergranularity
: choose value between 'auto', 'dense' and 'low' depending on Header bBidding line items CPM granularitytimeout
: the value can be modified (2000 is the recommended value)ids
: enable to configure User ID modulestargeting
: values enabling to define customised attributes for the page. They are used for targeting and reporting in Xandr. The targeting could be also configured via the functionn360Ad.setTargeting
(see below).
n360Ad.defineXandrSlot
:setNexx360Id
: placement ID indicated for each line of the placements listsetLabel
: value allowing to name the ad slot that will be used for Nexx360 reporting.
The
setLabel
notion is important and highly recommended because it takes action in the monetisation. This notion is transferred via the bid request and is used by SSPs to classify inventory.
The feature
n360Ad.defineXandrSlot
incorporates the principles of apntag.defineTag
with the same elements. Each field must be replaced by your own configuration parameters:
invCode
: fill the Xandr inventory codesizes
: selection of inventory sizes for the ad placementtargetId
: div name that will be added in the<body>
at the location where the ad slot is to be deliveredkeywords
: enables to define customised attributes for the ad slot. They are used for targeting and reporting in Xandr.
Different fields are optionals depending on your configuration.
You can activate the Amazon SSP with those specific lines of code.
amazon: {
isActive: 1,
pubId: 'ENTER YOUR AMAZON PUB ID'
}
isActive
: 1 or 0 according to the activation or not for AmazonpubId
: Publisher ID Amazon with 36 characters
You can activate Teads SSP (while waiting for its server-side adapter) by adding the following code at the ad slot definition level
n360Ad.defineXandrSlot
(operation to repeat for each relevant placement)..setTeadsPageId('ENTER YOUR TEADS PAGE ID')
.setTeadsPlacementId('ENTER YOUR TEADS PLACEMENT ID')
setTeadsPageId
: Teads Page IDsetTeadsPlacementId
: Teads Placement ID related to the ad placement
Last modified 4mo ago