Electronic House
Click-Tracking in Open AdStream
Special Instructions for Flash Developers

Electronic House uses Open AdStream (OAS), powered by 24/7 Real Media, to manage banner ads. While tracking impressions delivered for a given banner placement is inherent to the OAS application’s purpose, tracking clicks on Flash banners requires some extra preparation.

In order for a flash ad to properly track clicks, the original source file must be prepared to receive click-through parameters. This preparation is typically handled in the .fla by the flash developer.

Specific instructions for setting up the proper click-through parameters can be found for Flash versions 7-10 using ActionScript 2.0 and Flash versions 9 and 10 using ActionScript 3.0. More information on flash development can be found in Macromedia’s help manuals.

Preparing Flash for Click Tracking

Set Up Steps for Flash 9-10 using ActionScript 3.0:
Create a Button. If the button is not already on the stage, drag it to the stage.
Give the button an instance name (myButton) on the stage
Right click on the first key frame for the layer that contains the button (in the timeline pane). From the context menu select “Actions” (this will open the Actions Frame for that layer).
Place the click tag actionscript (listed below) in the Actions Frame

// ActionScript 3.0
/* Requires
* - Button symbol on Stage with instance name “myButton”
*/
myButton.addEventListener(MouseEvent.CLICK, buttonSymbol_click);
function buttonSymbol_click(evt:MouseEvent):void {
var clickTAG:String = loaderInfo.parameters.clickTAG;// Check for malicious code injections, only use URLs if they begin with http: or https: if ((clickTAG.substr(0, 5) == "http:") || (clickTAG.substr(0, 6) == "https:"))
{
var req:URLRequest = new URLRequest(clickTAG);
navigateToURL(req, "_blank");
}
}

Set Up Steps for Flash 7-10 using ActionScript 2.0:
A clickable flash object such as a button or “hitarea” in the flash movie clip will require some actionscript attached to it.
Associate the on(release) event with that object.
The object will now listen for that particular event. When the event occurs it will trigger actionscript instructions.
Place the click tag actionscript (listed below) as the instructions for the “on(release)” event

on(release)
{
getURL(_root.clickTAG, "_blank");
}

Make sure to check off the “Expression” checkbox for the URL field that is the variable for the getURL actionscript function.

Additional Notes:
If the whole file is meant to be clickable, a transparent button should be placed on the top layer of the SWF.

In order to track clicks within OAS, the SWF must not be setup with a hardcoded click URL.

  • News
  • Cool Homes
  • Blogs
  • Photo Galleries