- Replace the query string keys
- Place the tag script in the page
<!-- BEGIN CONVERTMEDIA JS TAG -->
<SCRIPT type="text/javascript" SRC="//15.basebanner.com/BidRHanSer?oid=15&width=2&height=2&pubid=INSERT_PUBLISHER_ID&tagid=INSERT_TAG_ID&pstn=ENTER_PLACEMENT_ID_HERE&noaop=1&revmod=INSERT_CONTENT_TYPE&encoded=1&cb=INSERT_CACHEBUSTER&keywords=INSERT_COMMA_SEPARATED_KEYWORDS&callback=document.write&urlonly=1"></SCRIPT>
add personalization confif script to the page
<script>
window.cmTagConfig = {
isDebug: true,
onOutOfView: "detach"
};
</script>
accepts: "INLINE"/"INTERSTITIAL"/"SLIDER"
default: "INLINE"
window.cmTagConfig = {
unitType:"INLINE"
}
accepts: true/false
default: false
window.cmTagConfig = {
isDebug:true
}
hasCloseButton
accepts: true/fale
default: true
secondsToCloseButton
accepts: number 0...60
default: 5
window.cmTagConfig = {
closeButton:{
hasCloseButton:true,
secondsToCloseButton:10
}
}
accepts: "none","pause","detach"
default:"pause"
window.cmTagConfig = {
onOutOfView:"detach"
}
accepts: numbers 0...100
default:20
window.cmTagConfig = {
viewPercent:50
}
accepts: js/css selector/ array of js/css selectors
default: no selector (the video will open next to the tag placement)
//one selector
window.cmTagConfig = {
parentSelectr:"div.block.B3 > div:nth-child(1)"
}
//array of selectors
window.cmTagConfig = {
parentSelectr:["article","#div1","div.block.B3 > div:nth-child(1)"]
}
accepts:"detach"/"none"
default value:"none"
window.cmTagConfig = {
onClose:"detach"
}
accepts: number 0...60
default value:3
window.cmTagConfig = {
secondsToAd:5
}
accepts: number 500...1000
default:900
window.cmTagConfig = {
width:850
}
*the height is auto calculated
accepts: number 0...60
default value:3
accepts: number 300...1000
default:402
horizontal
accepts:"right"/"left"
default:"right"
vertical
accepts: "top"/"middle"/"bottom"
defautl: "bottom"
window.cmTagConfig = {
position:{
horizontal:"right",
vertical:"top"
}
}
accepts: callback
window.cmTagConfig = {
onReady:function(){
console.log("the adUnit is ready");
}
}
accepts: callback
window.cmTagConfig = {
onConversion:function(){
console.log("the adUnit is playing the video ad");
}
}
accepts: callback
window.cmTagConfig = {
onAdDone:function(){
console.log("the adUnit is playing done playing the video ad ");
}
}
accepts: callback
window.cmTagConfig = {
onClosedByUser:function(){
console.log("the user closed clicked on the close button");
}
}
<script>
window.cmTagConfig = {
isDebug: true,
onOutOfView: "detach",
demandConfig: {
waterfall: {
"totalTimeout": 180,
"tags": [
{
pixel:"http://localhost/pixel",
"url": "http://ad4.liverail.com/?LR_PUBLISHER_ID=151025&LR_SCHEMA=vast2-vpaid&LR_TITLE=%%title%%&LR_VIDEO_ID=%%video-url%%&LR_DURATION=30&LR_AUTOPLAY=1&LR_MUTED=0&LR_VERTICALS=%%VERTICAL%%&LR_TAGS=%%tag%%&LR_URL=%%domain%%"
}
]
}
}
};
</script>