How to prepare your flash banner for the ad tracking system with a clickTAG.

The clickTAG is the tracking code assigned by the ad serving network to an individual ad. The clickTAG allows the network to register where the ad was displayed when it was clicked on. The click through data is reported back to the ad server to determine the effectiveness of the campaign.

To setup clickTag open your Flash project, choose "Movie" > "Export Options" and check clickTag. The entire area of your banner will be now clickable with on(release) { getURL(clickTag, "_blank"); } action defined automatically.

Use "Arguments" field to test the banner with your landing page.

You your Alligator version is below then read the instructions below or upgrade to version or above.

The tracking tag is passed to flash movie as a variable: "clickTAG" or "url":

<PARAM NAME="MOVIE" VALUE="banner.swf?clickTAG=[...]">


<EMBED SRC="banner.swf?clickTAG=[...]"

To prepare your banner for the system:

  1. Launch Flash Designer and open your document.
  2. Select the item that acts as the clickable area.
  3. Choose "Item" > "Actions" > "OnUp" (this is equivalent to on(release) {...} code)
  4. Select "ActionScript" option and type the code:

    if(clickTAG.substr(0,4)=="http") getURL(clickTAG,"_blank");

  5. Export SWF file with "File" > "Export SWF File" command.

NOTE: your system may be using "url" variable instead of "clickTAG".

In case the clickTAG is encoded http%3A%2F%2Fwww... use the code:

clickTAG = "http://" + clickTAG.slice(13);
if(clickTAG.substr(0,4)=="http") getURL(clickTAG,"_blank");

Testing the ad

Obtain the clickTAG from your ad system. Choose "Movie" > "Export Options" and enter the tag under Arguments:

Choose "File" > "Export HTML Page". A sample page with your banner will popup and the clickTAG will appear in the code to enable ad tracking in the example HTML page.

See also: Link entire banner to an URL

Macromedia Security Note for all Flash advertisers:
The ActionScript in all Flash advertisements must verify that the clickTAG URL begins with "http:". This is an important security measure. If you do not take this precaution, a malicious HTML page could source your SWF and pass a clickTAG URL that begins with "javascript:" or another scripting pseudo-protocol. If your ActionScript code were to call getURL with a maliciously crafted JavaScript URL, it would be possible for the site serving the malicious HTML page to obtain the contents of your HTTP cookies or perform other actions on your site's behalf.