Adform

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

<script language="javascript" src="https://track.adform.net/adfscript/?bn=956745"></script>
<noscript>
<a href="https://track.adform.net/C/?bn=956745;C=0" TARGET="_blank">
<img src="https://track.adform.net/adfserve/?bn=956745;srctype=4;ord=[timestamp]" border="0" width="300" height="250" alt="">
</a>
</noscript>

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:

<script language="javascript" src="https://track.adform.net/adfscript/?bn=956745;click=%%CLICK_URL_UNESC%%"></script>
<noscript>
<a href="%%CLICK_URL_UNESC%%https://track.adform.net/C/?bn=956745;C=0" TARGET="_blank">
<img src="https://track.adform.net/adfserve/?bn=956745;srctype=4;ord=%%CACHEBUSTER%%" border="0" width="300" height="250" alt="">
</a>
</noscript>

IFRAME Code

Original Code

You should have received some IFRAME code from Adform that looks similar to the following example:

<iframe name="CPbanner871552" src="https://track.adform.net/adfscript/?bn=956745;cpjs=2;ord=[timestamp]" width="970" height="250" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe>

Modified Code

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

<iframe name="CPbanner871552" src="https://track.adform.net/adfscript/?bn=956745;click=%%CLICK_URL_UNESC%%;cpjs=2;ord=%%CACHEBUSTER%%" width="970" height="250" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe>

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>