moatClientLevel1=%eadv!
moatClientLevel2=%ebuy!
moatClientLevel3=%eaid!
moatClientLevel4=%ecid!
moatClientSlicer1=[Property ID] ? Did we decide to use the adunit1 name here or the id? The Property ID would be %epid!
moatClientSlicer2=[Zone ID] ? Did we decided to use the adunit2 name here or the id? The Zone ID would be %esid!
Lee:
The implementation is as follows:
NOTE A: In the mb_payload object, for every creative web template you’ll need to add:
“advertiserID” : “%eadv!”,
NOTE B: If the guys decide that Property ID and Zone ID should be the DFP macros, you’ll need to add those to the mb_payload object as well.
NOTE C: Piggy back on metrics.js or whichever JS lib you deem best to include this. The DOM MUST already have the ad FULLY rendered for this to work as we’ll need to add a className called “adContainer” to the DIV that holds the full 650x500 px creative (images and video). For each product, we also have three different IDs for each DIV container. Below is what it looks like for Rescue (views.) You’ll have to case it out based on the product type:
THE CODE:
/* fire this function only on full view (rescue AND reward = after opt-in panel, Rally after it’s fully opened up) */
function dropMoat(){
'&moatClientLevel2='+mb_payload.euui+
'&moatClientLevel3='+mb_payload.adid+
'&moatClientLevel4='+mb_payload.crid+
'&moatClientSlicer1='+mb_payload.siteName+
'&moatClientSlicer2='+mb_payload.zone;
If( mb_payload.product_type == ‘views’ ){
mbEnticeVars.mb_views_module.className = 'adContainer’;
}else if( mb_payload.product_type == ‘flex’ ){
mbEnticeVars.whatever the flex container DIV is.className = 'adContainer’;
}else if( mb_payload.product_type == ‘rewards’ ){
mbEnticeVars.whatever the rewards container DIV is.className = 'adContainer’;
}
mb_util.appendScript(moat_url, "mbrix_moat", null);
}
If we decide to include mobile, it would be the same except for the SECURE URL and mb_util.appendScript function. Mobile doesn’t define it so you’d have to recreate the mb_util.appendScript function.