Ad Tag Macros Insertion Guide - Version 4 ( Ad Slvr,Yield Manager,PROJECT SUNBLOCK, OPENX, APPNEXUS,ADSHUFFLE) Skip to main content

Ad Tag Macros Insertion Guide – Version 4 ( Ad Slvr,Yield Manager,PROJECT SUNBLOCK, OPENX, APPNEXUS,ADSHUFFLE)

As Technology Changes, Many New Third Party Vendors Are Providing Creative Tags For Ads. It’s Very Important To Understand The Macros (Cache Buster/Click Tracker Implementation) So That No Discrepancy Will Occur In The Campaign. This Post Will Guide You All For Macros Implementation For Adslvr,Yield Manager,Project Sunblock, Openx, Appnexus,Adshuffle 


Adslvr


<script>

window._lvr = window._lvr || [];

_lvr.push({

LR_PUBLISHER_ID: xxxxxx,

LR_VERTICALS: 'xxxxxxxxmaxbrand',

format: 'xxxxxxxxx',

LR_PARTNERS: xxxxxx,

slot: '',

type: 1,

cookie: 30,

clearslot: ''

});

(function () {

var js = document.createElement('script');

js.type = 'text/javascript';

js.async = true;

js.src = '//cdn.adslvr.com/adslvr-min.js';

var s = document.getElementsByTagName('script')[0];

s.parentNode.insertBefore(js, s);

})();

</script>

YIELD MANAGER

<IFRAME FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=NO WIDTH=300 HEIGHT=250 SRC="http://ad.yieldmanager.com/st?ad_type=iframe&ad_size=300x250&section=XXXXXXX&pub_redirect_unencoded=1&pub_redirect=${CLICK_URL}"></IFRAME>

Modified:

<IFRAME FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=NO WIDTH=300 HEIGHT=250 SRC="http://ad.yieldmanager.com/st?ad_type=iframe&ad_size=300x250&section=XXXXXXX&pub_redirect_unencoded=1&pub_redirect=$%c"></IFRAME>

PROJECT SUNBLOCK

When previewing Project Sunblock tags – please ensure you deselect ‘Serve in iFrame’ as this will stop the tags previewing in Console and you will be unable to test click-tracking.


<script type='text/javascript'>var _sblq = _sblq || [];(function() {var s = document.getElementsByTagName('script'), s0 = s[0], adElement = s[s.length-1];
var sl = Math.random().toString(36).substring(2);

_sblq.push([sl, 'setClickUrl', '${CLICK_URL}']);

_sblq.push([sl, 'displayAd', adElement,300, 1234]);

var sb = document.createElement('script'); sb.type = 'text/javascript'; sb.async = true; sb.defer = true;

sb.src = ('http:'==document.location.protocol ? "http:" : "https:")+'//js.sblk.io/sb.js';

s0.parentNode.insertBefore(sb, s0);

})();</script>

<noscript><img src='//api.sblk.io/request.gif?campaign_id=000&ad_id=0000' width='1' height='1'></noscript>


Modified:

<script type='text/javascript'>var _sblq = _sblq || [];(function() {var s = document.getElementsByTagName('script'), s0 = s[0], adElement = s[s.length-1];
var sl = Math.random().toString(36).substring(2);

_sblq.push([sl, 'setClickUrl', '$%c']);

_sblq.push([sl, 'displayAd', adElement,300, 1234]);

var sb = document.createElement('script'); sb.type = 'text/javascript'; sb.async = true; sb.defer = true;

sb.src = ('http:'==document.location.protocol ? "http:" : "https:")+'//js.sblk.io/sb.js';

s0.parentNode.insertBefore(sb, s0);

})();</script>

<noscript><img src='//api.sblk.io/request.gif?campaign_id=000&ad_id=0000' width='1' height='1'></noscript>

OPENX

<script type='text/javascript'><!--//<![CDATA[document.MAX_ct0 ='${CLICK_URL}';var m3_u = (location.protocol=='https:'?'https://example.adserver.com/ajs.php':'http://example.adserver.com/ajs.php');
var m3_r = Math.floor(Math.random()*99999999999);

if (!document.MAX_used) document.MAX_used = ',';

document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);

document.write ("?zoneid=123&bannerid=3456");

document.write ('&amp;cb=' + m3_r);

if (document.MAX_used != ',') document.write ("&amp;exclude=" + document.MAX_used);

document.write (document.charset ? '&amp;charset='+document.charset : (document.characterSet ? '&amp;charset='+document.characterSet : ''));

document.write ("&amp;loc=" + escape(window.location));

if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer));

if (document.context) document.write ("&context=" + escape(document.context));

if ((typeof(document.MAX_ct0) != 'undefined') && (document.MAX_ct0.substring(0,4) == 'http')) {

document.write ("&amp;ct0=" + escape(document.MAX_ct0));

}

if (document.mmm_fo) document.write ("&amp;mmm_fo=1");

document.write ("'></scr"+"ipt>");

//]]>--></script>

Modified:

<script type='text/javascript'><!--//<![CDATA[document.MAX_ct0 ='$%c';var m3_u = (location.protocol=='https:'?'https://example.adserver.com/ajs.php':'http://example.adserver.com/ajs.php');
var m3_r = Math.floor(Math.random()*99999999999);

if (!document.MAX_used) document.MAX_used = ',';

document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);

document.write ("?zoneid=123&bannerid=3456");

document.write ('&amp;cb=' + m3_r);

if (document.MAX_used != ',') document.write ("&amp;exclude=" + document.MAX_used);

document.write (document.charset ? '&amp;charset='+document.charset : (document.characterSet ? '&amp;charset='+document.characterSet : ''));

document.write ("&amp;loc=" + escape(window.location));

if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer));

if (document.context) document.write ("&context=" + escape(document.context));

if ((typeof(document.MAX_ct0) != 'undefined') && (document.MAX_ct0.substring(0,4) == 'http')) {

document.write ("&amp;ct0=" + escape(document.MAX_ct0));
}
if (document.mmm_fo) document.write ("&amp;mmm_fo=1");
document.write ("'></scr"+"ipt>");
//]]>--></script>

APPNEXUS


<!-- BEGIN JS TAG - 728x90 < - DO NOT MODIFY --> <SCRIPT SRC="http://ib.adnxs.com/ttj?id=1812103&cb=${CACHEBUSTER}&pubclick=${CLICK_URL_ENC}" TYPE="text/javascript"></SCRIPT><!-- END TAG -->

Modified:

<!-- BEGIN JS TAG - 728x90 < - DO NOT MODIFY --> <SCRIPT SRC="http://ib.adnxs.com/ttj?id=1812103&cb=$%n&pubclick=$%n" TYPE="text/javascript"></SCRIPT><!-- END TAG -->

ADSHUFFLE

<iframe allowTransparency="true" frameborder="0" scrolling="no"marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" width="728"height="90"src="https://this.content.served.by.adshuffle.com/p/kl/01/234/r/56/7/8/abdef/ghijkl/view.html?${CACHEBUSTER}&ASTPCT=${CLICK_URL}"></iframe>

Modified:

<iframe allowTransparency="true" frameborder="0" scrolling="no"marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" width="728"height="90"src="https://this.content.served.by.adshuffle.com/p/kl/01/234/r/56/7/8/abdef/ghijkl/view.html?$%n&ASTPCT=$%c"></iframe>

Note:
If function math.random(); is present in the tags then there is no need to implement any cachebuster (%n) since This function act as random number generator.

Macros Insertion Guide For Different Third Party

 

Facebook Comments
 
 
   
   
     
   
      
 
   

Admin

My name's Sachin, and I am Blogger and tech geek, currently working in Digital Advertisement Domain having work experience of more than 3 years. Ad-Tag Macros is the professional association dedicated exclusively to online advertising operations and technology. We focus primarily on topics such as ad serving and related technologies, yield management, policies, procedures, and standards. Experience Platform DFP Small Business Google Analytics Native Ads Mgid WP ComScore Blogspot AdSense Skills HTML/CSS Javascript Yield optimization Trafficking Mobile web ads Display, video ads Troubleshooting creative issue SEO and Blog revenue Optimization For Any Queries Please Contact Me Contact@adtagmacros.com