Publisher
Base Technical Requirements
This module is GDPR and CCPA compliant, and no 3rd party userIds are allowed.
If you are a Publisher looking to integrate with AIDEM, you have two routes:
- Prebid: you can add our Prebid Adapter to your header bidding setup.
- GAM: you can create a Line Item, loading the code below as creative asset. This will not allow AIDEM to compete at impression level, and the Publisher will need to use average price bids to update the Line Item.
- Server Side: the SSP natively inject the ads in the HTML of the page direclty on the publisher server/CDN, without requiring any code in page. These ads cannot be adblocked, allowing publishers to recover on average 30% of inventory. This is a custom implementation, needing developers, or if your website is using Cloudflare you can leverage our native integration.
Prebid Adapter Config
Bidder Bid Params
Name | Scope | Description | Example | Type |
siteId | required | Unique site ID. Using your domain name is a good pick. | 'ABCDEF' | String |
publisherId | required | Unique publisher ID | 'FEDCBA' | String |
placementId | optional | Unique publisher tag ID | 'ABCDEF' | String |
rateLimit | optional | Limit the volume sent to AIDEM. Must be between 0 and 1 | 0.6 | Number |
Banner Bid Params
Name | Scope | Description | Example | Type |
sizes | required | List of the sizes wanted | [[300, 250], [300,600]] | Array |
Video Bid Params
Name | Scope | Description | Example | Type |
context | required | One of instream, outstream, adpod | 'instream' | String |
playerSize | required | Width and height of the player | '[640, 480]' | Array |
maxduration | required | Maximum video ad duration, in seconds | 30 | Integer |
minduration | required | Minimum video ad duration, in seconds | 5 | Integer |
mimes | required | List of the content MIME types supported by the player | ["video/mp4"] | Array |
protocols | required | An array of supported video protocols. At least one supported protocol must be specified, where: 2 = VAST 2.0 3 = VAST 3.0 5 = VAST 2.0 wrapper 6 = VAST 3.0 wrapper | 2 | Array |
Additional Config
Name | Scope | Description | Example | Type |
coppa | optional | Child Online Privacy Protection Act | true | Boolean |
consentManagement | optional | Consent Management Object | {} | Object |
Consent Management Object
First Party Data
Publishers supply First Party Data (FPD) by specifying attributes as configuration using Bidder-specific site data that applies to all AdUnits and auctions. Use setBidderConfig()
.
The Prebid First Party Data JSON structure reflects the OpenRTB standard: arbitrary attributes should go in ortb2.site.ext.data
.
Supplying Bidder-Specific Data
pbjs.setBidderConfig({
bidders: ['aidem'],
config: {
ortb2: {
site: {
ext: {
data: {
pageType: "article",
category: "tools"
}
}
}
}
}
});
Prebid adUnits examples
Example Banner ad unit
var adUnits = [{
code: 'banner-prebid-test-site',
mediaTypes: {
banner: {
sizes: [
[300, 600],
[300, 250]
]
}
},
bids: [{
bidder: 'aidem',
params: {
placementId: 'homepage/header',
siteId: 'yourwebsitedomain.com',
publisherId: '8000000000008',
},
}]
}];
Example Video ad unit
var adUnits = [{
code: 'video-prebid-test-site',
mediaTypes: {
video: {
context: 'instream',
playerSize: [640, 480],
maxduration: 30,
minduration: 5,
mimes: ["video/mp4"],
protocols: 2
}
},
bids: [{
bidder: 'aidem',
params: {
placementId: 'videosection/preroll',
siteId: 'yourwebsitedomain.com',
publisherId: '8000000000008',
},
}]
}];
Prebid config examples
Example GDPR Consent Management
var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
pbjs.que.push(function (){
pbjs.setConfig({
consentManagement: {
gdpr:{
cmpApi: 'iab'
}
}
});
})
Example USP Consent Management
var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
pbjs.que.push(function (){
pbjs.setConfig({
consentManagement: {
usp:{
cmpApi: 'static',
consentData:{
getUSPData:{
uspString: '1YYY'
}
}
}
}
});
})
Setting First Party Data (FPD)
var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
pbjs.que.push(function (){
pbjs.setConfig({
ortb2: {
site: {
cat: ['IAB2'],
sectioncat: ['IAB2-2'],
keywords: 'power tools, drills'
},
}
});
})
GAM Line Item Code Examples
US Compliant Code
<script type="text/javascript" src="https://zero.aidemsrv.com/dist/prebid.js" async></script>
<script>
var adUnits = [
{
code: 'zerossp-div',
mediaTypes: {
banner: {
sizes: [[%%WIDTH%%, %%HEIGHT%%]],
}
},
bids: [
{
bidder: 'aidem',
params: {
placementId: '%%ADUNIT%%',
siteId: '[[TO_BE_REPLACED_WITH_YOUR_SITEID]]',
publisherId: '[[TO_BE_REPLACED_WITH_YOUR_PUBLISHERID]]',
}
}
]
}
];
var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
pbjs.que.push(function (){
pbjs.setConfig({
consentManagement: {
usp:{
cmpApi: 'static',
consentData:{
getUSPData:{
uspString: '%%TAG_PARAM:us_privacy%%'
}
}
}
}
});
})
</script>
<script>
pbjs.que.push(function() {
pbjs.addAdUnits(adUnits);
});
function renderAllAdUnits() {
var winners=pbjs.getHighestCpmBids();
for (var i = 0; i < winners.length; i++) {
renderOne(winners[i]);
}
}
function renderOne(winningBid) {
if (winningBid && winningBid.adId) {
var div = document.getElementById(winningBid.adUnitCode);
if (div) {
let iframe = document.createElement('iframe');
iframe.frameBorder = '0';
iframe.marginHeight = '0';
iframe.marginWidth = '0';
iframe.scrolling = 'no';
div.appendChild(iframe);
var iframeDoc = iframe.contentWindow.document;
pbjs.renderAd(iframeDoc, winningBid.adId);
}
}
}
</script>
<script>
pbjs.que.push(function() {
pbjs.requestBids({
timeout: 2000,
bidsBackHandler: renderAllAdUnits
});
});
</script>
<div id="zerossp-div"></div>
EU Compliant Code
<script type="text/javascript" src="https://zero.aidemsrv.com/dist/prebid.js" async></script>
<script>
var adUnits = [
{
code: 'zerossp-div',
mediaTypes: {
banner: {
sizes: [[%%WIDTH%%, %%HEIGHT%%]],
}
},
bids: [
{
bidder: 'aidem',
params: {
placementId: '%%ADUNIT%%',
siteId: '[[TO_BE_REPLACED_WITH_YOUR_SITEID]]',
publisherId: '[[TO_BE_REPLACED_WITH_YOUR_PUBLISHERID]]',
}
}
]
}
];
var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
pbjs.que.push(function (){
pbjs.setConfig({
consentManagement: {
usp:{
cmpApi: 'static',
consentData:{
gdpr:{
cmpApi: 'iab'
}
}
}
}
});
})
</script>
<script>
pbjs.que.push(function() {
pbjs.addAdUnits(adUnits);
});
function renderAllAdUnits() {
var winners=pbjs.getHighestCpmBids();
for (var i = 0; i < winners.length; i++) {
renderOne(winners[i]);
}
}
function renderOne(winningBid) {
if (winningBid && winningBid.adId) {
var div = document.getElementById(winningBid.adUnitCode);
if (div) {
let iframe = document.createElement('iframe');
iframe.frameBorder = '0';
iframe.marginHeight = '0';
iframe.marginWidth = '0';
iframe.scrolling = 'no';
div.appendChild(iframe);
var iframeDoc = iframe.contentWindow.document;
pbjs.renderAd(iframeDoc, winningBid.adId);
}
}
}
</script>
<script>
pbjs.que.push(function() {
pbjs.requestBids({
timeout: 2000,
bidsBackHandler: renderAllAdUnits
});
});
</script>
<div id="zerossp-div"></div>