Help Center Manage Your Account Banner, Richmedia, and Text Ads

How do I track clicks for HTML or Rich-Media ads?

To track clicks for Rich-Media/HTML ads, check "Automatically process HTML code to track clicks" below the HTML code box. This feature can track clicks for many ad formats, including multiple hyper-links, forms, client-side image maps. For a third-party HTML ad tag, a click macro is needed to track clicks.

Third-Party Ad Tag

If the HTML code points to a third-party JavaScript or Iframe tag, we need that third-party ad server to support external/3rd-party click tracking feature via a click macro. The reason is that the JavaScript/Iframe ad request will generate its own dynamic code, which changes on every call. For these calls, we cannot modify or control the code generated by the other ad server.

For example: Google AdSense's ad tag dynamically generates text link ads on every page load. We cannot alter any code generated by AdSense because it is against Google's legal terms and will cause issues with your account with Google. Unless third-party click tracking is officially supported by Google AdSense, these clicks are not track-able using the click macro.

Third-party click tracking feature allows AdSpeed to track clicks served by other ad servers. This feature is reciprocal between ad servers. Here is the process flow:

  1. Overview: 3rd Party Ad Server -> AdSpeed -> Landing Page URL
  2. When a visitor clicks on the ad, the 3rd party ad server records this click first
  3. It then passes on to AdSpeed's click tracker, which in turn, logs this click into our system
  4. AdSpeed redirects visitor to the destination landing page URL

Rich-Media and HTML Ad Wizard

You can use our ad wizard when creating/editing the third party ad to enable click tracking in both AdSpeed ad server and the other ad server. These are the steps to enable click tracking for a Rich-Media/HTML ad:
Convert an Existing Rich-Media Ad
  • Click on the ad name
  • Click Edit tab
  • Click on the link "Rich Media HTML Wizard" below the text box
  • Click on the link "Prepare a third-party ad tag for click tracking"
  • Choose one of the third-party ad servers
  • Enter the ad tag provided by your client (the advertiser or the ad agency)
  • Replace the existing HTML code for this ad with the new code generated from the wizard
Create a New Rich-Media Ad
  • Follow the menu Ads / Create a new Ad
  • Choose the ad type to be "Rich-Media Ad"
  • Click on the "Rich Media HTML Wizard" link below the text box
  • Click on the link "Prepare a third-party ad tag for click tracking"
  • Choose one of the third-party ad servers
  • Enter the ad tag provided by your client (the advertiser or the ad agency)
  • Copy and paste the code generated by the wizard into the new Rich-Media ad

Click Tracking Verification

Since there are multiple providers and also multiple tag versions from the same provider, you should always test the ad for proper click tracking in both ad servers.
  1. Preview the ad via our interface or your own test page
  2. Make test click(s) on the ad
  3. Make sure it goes to the right landing page with no error
  4. View the Overall report for the ad. The click counter should increase in real-time according to your test click(s)
  5. Verify the test click(s) with the ad provider. There may be a delay from their report if it is not in real-time


  • Ask the other ad server if they support external/3rd party click tracking with a click macro
  • If it does, you also need to know where to place this special parameter into its ad tag
  • When adding a Rich-Media/HTML ad into our adserver, you have the HTML ad tag provided by the external adserver. For both ad servers to track the same click, you need to place our click tracker macro at the appropriate location into the 3rd party ad tag
  • Since there are different ad servers available on the market, there are several types of click tracking macros. Choosing the right click macro depends on the third-party ad server. The most popular versions are [ASClickLinkEscaped] and [ASClickLinkUnescaped]. Please contact us if you need more information about a specific variable
  • When AdSpeed serves the ad, it will replace the click macro with a dynamic click tracker link. The landing page URL should immediately follow this link. Therefore, you should typically place the click macro at the end of the ad URL
  • Use [ASClickLinkEscaped2] when the click link needs to have the "&" ampersand sign encoded twice
  • Use [ASClickLinkJSImgSQ] (for single quotes) or [ASClickLinkJSImgDQ] (for double quotes)
  • if you want to count clicks via JavaScript. Example: onclick="[ASClickLinkJSImgSQ]"

Sample Usage - DoubleClick

<iframe src="https://.../Bxx;sz=728x90;ord=[timestamp]?" width=728...
<script src="https://.../Bxx;sz=728x90;ord=[timestamp]?"></script>

would become
<iframe src="https://.../Bxx;sz=728x90;ord=[timestamp];click=[ASClickLinkEscaped]" width=728...
<script src="https://.../Bxx;sz=728x90;ord=[timestamp];click=[ASClickLinkEscaped]">

Sample Usage - Atlas

<iframe src="">...</iframe>

would become

<iframe src="[ASClickLinkEscaped]">...</iframe>

Sample Usage - Sizmek/EyeBlaster/MediaMind

<script src=""></script>

would become

<script src="[ASClickLinkEscaped]"></script>

Sample Usage - PointRoll

var pr_redir="$CTURL$";

would become

var pr_redir="[ASClickLinkEscaped]$CTURL$";

Sample Usage - AdTech/AOL

<script language="javascript">
document.write('<scr'+'ipt src=";sub1=javascript;misc=[timestamp];rdclick=[ASClickLinkEscaped]"></scri'+'pt>');
<a href=";loc=300;misc=[timestamp]" target="_blank"><img src=";loc=300;misc=[timestamp]" border="0" width="300" height="250"></a>
Some AOL ads use [ASClickLinkUnescaped] so it is always recommended to test. Other ad serving domains for AOL include "" and "".

Technical Support

If you need our assistance in adding a click macro, please create a Rich-Media/HTML ad using the provided third-party ad tag and then send us its ad ID.

Other Articles in Banner, Richmedia, and Text Ads

Information about different ad formats, dimension, sizes, and specifications.

Cannot find an answer for your question? Ask our Customer Care team