The following presents a guideline on how AppNexus 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 AppNexus that looks similar to the following example:
<SCRIPT SRC="https://ib.adnxs.com/ttj?id=589456&cb=[CACHEBUSTER]&pubclick=[INSERT_CLICK_TAG]" TYPE="text/javascript"></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 SRC="https://ib.adnxs.com/ttj?id=589456&cb=%%CACHEBUSTER%%&pubclick=
%%CLICK_URL_UNESC%%" TYPE="text/javascript"></SCRIPT>
IFRAME Code
Original Code
You should have received some IFRAME code from AppNexus that looks similar to the following example:
<IFRAME SRC="https://ib.adnxs.com/tt?id=589456&cb=[CACHEBUSTER]&pubclick=[INSERT_CLICK_TAG]" FRAMEBORDER="0" SCROLLING="no" MARGINHEIGHT="0" MARGINWIDTH="0" TOPMARGIN="0" LEFTMARGIN="0" ALLOWTRANSPARENCY="true" WIDTH="300" HEIGHT="250"></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 SRC="https://ib.adnxs.com/tt?id=589456&cb=%%CACHEBUSTER%%&pubclick=%%CLICK_URL_UNESC%%" FRAMEBORDER="0" SCROLLING="no" MARGINHEIGHT="0" MARGINWIDTH="0" TOPMARGIN="0" LEFTMARGIN="0" ALLOWTRANSPARENCY="true" WIDTH="300" HEIGHT="250"></IFRAME>
VAST (PTV) Code
Original Code
You should have received a VAST (PTV) tag from AppNexus that looks similar to the following example:
https://secure.adnxs.com/ptv?id=87454312&cb=[CACHEBUSTER]&pubclick=[INSERT_CLICK_TAG]
Modified Code
What you need to do is modify the URL in the tag as shown by the highlighted changes, The resulting tag should look similar to the following example:
https://secure.adnxs.com/ptv?id=87454312&cb=%%CACHEBUSTER%%&pubclick=%%CLICK_URL_UNESC%%
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.
Note: A small amount of tag vendors use %%CLICK_URL_UNESC%%
when the click-tracker is the parameter of another URL, instead of %%CLICK_URL_ESC%%
.
<a href="%%CLICK_URL_UNESC%%https://www.google.com">link</a>
<a href="https://www.google.com?rd_url=%%CLICK_URL_ESC%%">link</a>