AdTech

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

<!-- JavaScript Tag -->
<script language="javascript">
<!--
document.write('<scr'+'ipt language="javascript1.1" src="https://adserver.adtechus.com/addyn/4.0/1000/4781256/1/897/ADTECH;loc=100;target=_blank;misc='+new Date().getTime()+';rdclick="></scri'+'pt>');
//-->
</script>
<noscript>
<a href="https://adserver.adtechus.com/adlink/4.0/1000/4781256/1/897/ADTECH;loc=300;rdclick=" target="_blank"><img src="https://adserver.adtechus.com/adserv/4.0/1000/4781256/1/897/ADTECH;loc=300" border="0" width="300" height="250"></a>
</noscript>
<!-- End of JavaScript Tag -->

Modified Code

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

<!-- JavaScript Tag -->
<script language="javascript">
<!--
document.write('<scr'+'ipt language="javascript1.1" src="https://adserver.adtechus.com/addyn/4.0/1000/4781256/1/897/ADTECH;loc=100;target=_blank;misc='+new Date().getTime()+';rdclick=%%CLICK_URL_ESC%%"></scri'+'pt>');
//-->
</script>
<noscript>
<a href="https://adserver.adtechus.com/adlink/4.0/1000/4781256/1/897/ADTECH;loc=300;rdclick=%%CLICK_URL_UNESC%%" target="_blank"><img src="https://adserver.adtechus.com/adserv/4.0/1000/4781256/1/897/ADTECH;loc=300" border="0" width="300" height="250"></a>
</noscript>
<!-- End of JavaScript Tag -->

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>