AdOcean

The following presents a guideline on how AdOcean 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 AdOcean that looks similar to the following example:

<script type="text/javascript"><!--<![CDATA[
/* (c)AdOcean 2003-2011 */
/* PLACEMENT: test.test_publ.banner */
if(location.protocol.substr(0,4)=='https')document.write(unescape('%3C')+'script id="test.test_publ.banner" src="'+location.protocol+'//myao.adocean.pl/_'+(new Date()).getTime()+'/ad.js?id=1x0ZwRu7L4MkR3RKRiXHc08w00TMwNzed34SNhQaYa0.G5/x='+screen.width+'/y='+screen.height+'" type="text/javascript"'+unescape('%3E%3C')+'/script'+unescape('%3E'));
//]]>--></script>

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"><!--<![CDATA[
/* (c)AdOcean 2003-2011 */
/* PLACEMENT: test.test_publ.banner */
if(location.protocol.substr(0,4)=='https')document.write(unescape('%3C')+'script id=" test.test_publ.banner " src="'+location.protocol+'//myao.adocean.pl/_'+(new Date()).getTime()+'/ad.js?id=1x0ZwRu7L4MkR3RKRiXHc08w00TMwNzed34SNhQaYa0.G5/redir=%%CLICK_URL_UNESC%%/x='+screen.width+'/y='+screen.height+'" type="text/javascript"'+unescape('%3E%3C')+'/script'+unescape('%3E'));
//]]>--></script>

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>