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

<h2>YIELD MANAGER Macros</h2>

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

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

<h2>PROJECT SUNBLOCK</h2>

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>

<h2>Modified Project sunblock</h2>
<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>

<h2>OPENX Macros</h2>

<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>

<h2>Modified OPENX Macros</h2>
<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>

<h2>APPNEXUS Macros</h2>

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

<h2>Modified APPNEXUS Macros </h2>
<!– BEGIN JS TAG – 728×90 < – DO NOT MODIFY –> <SCRIPT SRC=”http://ib.adnxs.com/ttj?id=1812103&cb=$%n&pubclick=$%n” TYPE=”text/javascript”></SCRIPT><!– END TAG –>

<h2>ADSHUFFLE Macros</h2>

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

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

<h2>Adslvr Tag Example</h2>
<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>

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.

©2024 AdTagMacros - Everything About Advertising

We improve our products and advertising by using Microsoft Clarity to see how you use our website. By using our site, you agree that we and Microsoft can collect and use this data. Our privacy statement has more details.

Log in with your credentials

Forgot your details?