Magnetisemedia

The following presents a guideline on how Magnetisemedia standard and rich media tags should be edited to count clicks in Google Ad Manager. In order to track clicks follow the procedure below:

JavaScript Code

Original Code

You should have received some JavaScript code from Magnetisemedia that looks similar to the following example:

<script type=”text/javascript”>
_ibproto=((“https:” == document.location.protocol)? “https:// <https:///> ” : “http:// <http:///> “);
_ib={width:300,height:250,ad:987,site:225,lead:null,click:””,cb:”%cb”,host:’adcentre.magnetisemedia.com’,clHost:’82859753952201.cloudfront.net’,trkHost:’formregistration.com’};
document.write(“<sc”+”ript type=’text/javascript’ src='”+_ibproto+_ib.clHost+”/inbanner.js’></scr”+”ipt>”);
</script>
<noscript>
<iframe src=”https://adcentre.magnetisemedia.com/trackstatic?ad=987&site=225&layoutType=in_banner&w=300&h=250″ width=”300px” height=”250px” frameborder=”0″ allowTransparency=”true” scrolling=”no” marginwidth=”0″ marginheight=”0″>
<p>
Sorry, your browser does not support iframes!
</p>
</iframe>
</noscript>

Modified Code

What you need to do is modify the URL in the <SCRIPT> tag as shown by the highlighted changes, The resulting tag should look similar to the following example:

<script type=”text/javascript”>
_ibproto=((“https:” == document.location.protocol)? “https:// <https:///> ” : “http:// <http:///> “);
_ib={width:300,height:250,ad:987,site:225,lead:null,click:”%%CLICK_URL_UNESC%%”,cb:”%%CACHEBUSTER%%”,host:’adcentre.magnetisemedia.com’,clHost:’82859753952201.cloudfront.net’,trkHost:’formregistration.com’};
document.write(“<sc”+”ript type=’text/javascript’ src='”+_ibproto+_ib.clHost+”/inbanner.js’></scr”+”ipt>”);
</script>
<noscript>
<iframe src=”https://adcentre.magnetisemedia.com/trackstatic?ad=987&site=225&layoutType=in_banner&w=300&h=250″ width=”300px” height=”250px” frameborder=”0″ allowTransparency=”true” scrolling=”no” marginwidth=”0″ marginheight=”0″>
<p>
Sorry, your browser does not support iframes!
</p>
</iframe>
</noscript>

Note

The ad server recognises the [timestamp] placeholder and will automatically replace it with a cache buster. It is not necessary to convert it to the %%CACHEBUSTER%% macro manually.

Use %%CLICK_URL_UNESC%% at the beginning of a link. Use %%CLICK_URL_ESC%% when the click-tracker is the parameter of another URL.

<a href="%%CLICK_URL_UNESC%%https://www.google.com">link</a>
<a href="https://www.google.com?rd_url=%%CLICK_URL_ESC%%">link</a>