AdLegend

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

JAVASCRIPT & IFRAME Code

Original Code

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

<IFRAME SRC="https://ad.adlegend.com/iframe?spacedesc=3548987_3548218_300x600_9845654_2534879&target=_blank&@CPSC@=" WIDTH=300 HEIGHT=600 SCROLLING="No" FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0>
<SCRIPT SRC="https://ad.adlegend.com/jscript?spacedesc=3548987_3548218_300x600_9845654_2534879&ML_NIF=Y&target=_blank&@CPSC@="></SCRIPT>
<NOSCRIPT>
  <A HREF="https://ad.adlegend.com/click?spacedesc=3548987_3548218_300x600_9845654_2534879&ML_NIF=Y" TARGET="_blank">
  <IMG SRC="https://ad.adlegend.com/image?spacedesc=3548987_3548218_300x600_9845654_2534879&ML_NIF=Y" WIDTH=300 HEIGHT=600 ALT="Click Here" BORDER=0>
  </A>
</NOSCRIPT>
</IFRAME>

Modified Code

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

<IFRAME SRC="https://ad.adlegend.com/iframe?spacedesc=3548987_3548218_300x600_9845654_2534879&target=_blank&@CPSC@=%%CLICK_URL_UNESC%%" WIDTH=300 HEIGHT=600 SCROLLING="No" FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0>
<SCRIPT SRC="https://ad.adlegend.com/jscript?spacedesc=3548987_3548218_300x600_9845654_2534879&ML_NIF=Y&target=_blank&@CPSC@=%%CLICK_URL_UNESC%%"></SCRIPT>
<NOSCRIPT>
  <A HREF="%%CLICK_URL_UNESC%%https://ad.adlegend.com/click?spacedesc=3548987_3548218_300x600_9845654_2534879&ML_NIF=Y" TARGET="_blank">
  <IMG SRC="https://ad.adlegend.com/image?spacedesc=3548987_3548218_300x600_9845654_2534879&ML_NIF=Y" WIDTH=300 HEIGHT=600 ALT="Click Here" BORDER=0>
  </A>
</NOSCRIPT>
</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>