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

How do I track click for Flash/SWF ads?

Flash ads (SWF files) should not use a static link for the click button, it should use clickTAG parameter, which is an industry-standard for click tracking. clickTAG is used across all ad servers to track clicks of Flash/SWF ads. Our system will ask for the actual click URL when you create the SWF ad in our system.

Conversion

The original ActionScript 2 code for the button instance should be something like this:
on (release) {
  getURL("http://www.macrophotos.net/","_top");
}

After the conversion for click tracking, it should look like this:

on (release) {
  if (_root.clickTAG.substr(0,4) == "http") {
    getURL(_root.clickTAG,_root.TargetAS);
  }
}

For ActionScript 3, MyClickButton is the name of the button instance and the code would become:

MyClickButton.addEventListener(
  MouseEvent.CLICK,
  function():void {
    if (root.loaderInfo.parameters.clickTAG.substr(0,4) == "http") {
      navigateToURL(
        new URLRequest(root.loaderInfo.parameters.clickTAG),
        root.loaderInfo.parameters.TargetAS
      );
    }
  }
);
If you would like to know more technical details, please review the official instructions from Adobe Flash. For greater compatibility, our system uses "_root.clickTAG" instead of "clickTAG". Because Flash ads can be served within IFRAMEs, it's best to use target "_top" or "_blank" for the getURL function. For better security, the ActionScript code checks for a standard/secure URL (http:// or https://), instead of allowing a possible malicious JavaScript code.

Sample Code

You can view this tutorial to create a SWF ad with clickTAG tracking from scratch. Or you can download these sample Macromedia .FLA files to compare:
  • Original files with a fixed URL and without click tracking:
    sample.fla (SWF: sample.swf)
  • After conversion, the files use clickTAG parameter for dynamic click tracking:
    sample-clickTAG.fla (SWF: sample-clickTAG.swf)
  • Also, please use this template to manually convert to clickTAG if our system failed to convert your SWF file automatically.

Troubleshoot and Test a SWF file for clickTAG

It is recommended to test all Flash ads for click tracking via clickTAG before allowing it to display online. Learn More

Online Converter

You can use the form below to modify a SWF ad to track clicks with clickTAG. Please upload the original Flash file and our system will try to convert it to use clickTAG. Once the conversion is done, it will download the updated SWF file to your computer.

This online conversion program is designed to be compatible with certain SWF settings and versions. The Flash ad should have one and only one static link to the landing page URL. Please note that it is NOT compatible with all SWF files.

For these cases, you would need to manually modify the SWF file and add the clickTAG parameter with the above instructions. If you have the modified SWF file and it still does not work properly. For example, if it does not open to a new window, redirects to the correct destination or tracks clicks, please follow the manual conversion instructions to prepare the SWF file instead.

clickTAG Converter (limit 500KB)
There was a problem with your submission. Please correct the following items:

    Flash/SWF Ad Generator

    Modifying the ActionScript code is the best method but if you're using a SWF creator with a simple interface instead of a full-feature application (like Adobe Flash, or Swish), you can use this option instead:
    • When editing the ad, under "Technical" section near the bottom of the page, you'll see "Click Tracking URL"
    • Copy and paste this link into the field asked by your Flash ad generator for the click-thru URL

    Request Assistance

    If you need our help with the Flash ad, please send us the original source FLA file. We need the source FLA file because the SWF file is a read-only file. We cannot view or edit read-only SWF files.

    Please be patient as it could take up to 72 hours for us to troubleshoot a FLA file. If you need us to prepare a Flash ad with clickTAG, there is a one-time cost for our technician's time.

    Other Articles in Banner, Richmedia, and Text Ads

    Media formats, ad sizes, type Richmedia, Normal/External, textlink
    Search Help Center
    There was a problem with your submission. Please correct the following items:

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

      Related Articles

      Have questions? Contact Us

      Testimonials for our Ad Servers

      • I have to say I am very impressed with the new version of your site. Great work!

        Chinedu E
        HopStop

      • I've signed up for the trial run but am confident that I'll continue. Great service!

        Wade W
        Cycling Tips Blog