Module Name: Adloox Ad Server Video
Module Type: Ad Server Video
Maintainer: [email protected]
Ad Server Video for adloox.com. Contact [email protected] for information.
This module pairs with the Adloox Analytics Adapter to provide video tracking and measurement.
Prebid.js does not support bidWon
events for video without the Instream Video Ads Tracking module that has the limitations:
- works only with instream video
- viewability metrics are not MRC accredited
This module has two modes of operation configurable with the wrap
parameter below:
true
[default]:false
:- sends a
bidWon
event only to the Adloox Analytics Adapter - inventory is measured
- viewability metrics are not MRC accredited.
- VAST tracking is not collected by Adloox
- sends a
N.B. this module is compatible for use alongside the Instream Video Ads Tracking module though not required in order to function
To view an example of an Adloox integration look at the example provided in the Adloox Analytics Adapter documentation.
To use this, you must also integrate the Adloox Analytics Adapter (and optionally the Instream Video Ads Tracking module) as shown below:
function sendAdserverRequest(bids, timedOut, auctionId) {
if (pbjs.initAdserverSet) return;
pbjs.initAdserverSet = true;
// handle display tags as usual
googletag.cmd.push(function() {
pbjs.setTargetingForGPTAsync && pbjs.setTargetingForGPTAsync(adUnits);
googletag.pubads().refresh();
});
// handle the bids on the video adUnit
var videoBids = bids[videoAdUnit.code];
if (videoBids) {
var videoUrl = pbjs.adServers.dfp.buildVideoUrl({
adUnit: videoAdUnit,
params: {
iu: '/19968336/prebid_cache_video_adunit',
cust_params: {
section: 'blog',
anotherKey: 'anotherValue'
},
output: 'vast'
}
});
pbjs.adServers.adloox.buildVideoUrl({
adUnit: videoAdUnit,
url: videoUrl
}, invokeVideoPlayer);
}
}
The helper function takes the form:
pbjs.adServers.adloox.buildVideoUrl(options, callback)
Where:
options
: configuration object:adUnit
: ad unit that is being filledbid
[optional]: if you override the hardcodedpbjs.adServers.dfp.buildVideoUrl(...)
logic that picks the first bid you must pass in thebid
object you selecturl
: VAST tag URL, typically the value returned bypbjs.adServers.dfp.buildVideoUrl(...)
wrap
:true
[default]: VAST tag is be converted to an Adloox VAST wrapped tagfalse
: VAST tag URL is returned as is
blob
:true
[default]: Blob URL is returned so that the VAST tag is only fetched once- only has an affect when
wrap
is set totrue
- only has an affect when
false
: VAST tag may be fetched twice depending on your Ad Server and video player configuration- use when the ad is served into a cross-origin (non-friendly) IFRAME
- use if during QAing you discover your video player does not supports Blob URLs; widely supported (including JW Player) so contact your player vendor to resolve this where possible for the best user and device experience
callback
: function you use to pass the VAST tag URL to your video player
N.B. call pbjs.adServers.adloox.buildVideoUrl(...)
as close as possible to starting the ad to reduce impression discrepancies