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

How do I track Flash/SWF ad with multiple clickTAGs?

If your Flash ad has multiple buttons, each with its own landing URL, you will need to use multiple clickTAGs for click tracking.

Step 1 - Prepare the Flash/SWF buttons

In this example, there are 2 buttons, each with its own landing page:
Button 1:
on (release) {
  getURL("http://www.example.com/button1_page.html","_blank");
}

Button 2:
on (release) {
  getURL("http://www.example.net/button2_page.html","_blank");
}

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

Button 1:
on (release) {
  if (_root.clickTAG.substr(0,4) == "http") {
    getURL(_root.clickTAG,'_blank');
  }
}

Button 2:
on (release) {
  if (_root.clickTAG2.substr(0,4) == "http") {
    getURL(_root.clickTAG2,'_blank');
  }
}
For ActionScript 3, the code for 2 buttons would look like this:
Button1.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
      );
    }
  }
);

Button2.addEventListener(
  MouseEvent.CLICK,
  function():void {
    if (root.loaderInfo.parameters.clickTAG2.substr(0,4) == "http") {
      navigateToURL(
        new URLRequest(root.loaderInfo.parameters.clickTAG2),
        root.loaderInfo.parameters.TargetAS
      );
    }
  }
);

Step 2 - Create the ad

Once you have the updated Flash/SWF file, you can create a new ad using the Rich-Media wizard for SWF ad. The wizard will ask for the SWF URL and additional landing page URL for each clickTAG. The result URL for the SWF ad will contain all the landing page URLs to pass along to the appropriate clickTAGs within the SWF file. For example:
http://example.org/ad.swf?clickTAG=http%3A%2F%2Fwww.example.com%2Fbutton1_page.html&clickTAG2=http%3A%2F%2Fwww.example.net%2Fbutton2_page.html
  • Follow the menu "Ads / Create a new ad"
  • Choose the ad type to be "Rich-Media Ad (HTML Code)"
  • Enter an ad name
  • Click on the link "Rich-Media HTML Wizard" below the text box
  • On that new window, click on "Generate HTML code for SWF file"
  • Enter the ad width and height
  • Enter the URL of the SWF file
  • Enter the landing page URL for the 1st clickTAG. You can change or leave the default naming "clickTAG". You can do the same for the additional clickTAGs
  • Click on button "Generate HTML"
  • Switch back to the ad creation window with the text box
  • Copy and paste this HTML code into the text box
  • Set the ad width and height
  • Save the new ad

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

Related