Adform Event tracking can be applied for different types of Flash events, e.g. clicks on specific Flash banner areas,  a mouse-over specific banner area, and etc. The implementation of the Event tracking depends on where the banners are hosted – on Adform servers or on Media servers.

This tutorial explains how to set up the event tracking in Flash banners hosted on the Adform servers.

Preview:

Examples:

Installation

In order to create banners with the Adform event tracking, you need to download specific Adform components. This is done by downloading and installing the Adform Creative Toolkit extension. More info about installing this plugin can be found here.

Creating banner

Adform strongly recommends using the Adform Creative Toolkit extension while creating banners with the Adform event tracking. For opening this extenstion proceed to Window → Other Panels → Adform in your Flash API Top Menu. The manual of Adform Creative Toolkit can be found here.

However, you are also able to create banners with the Adform event tracking without using the Adform Creative Toolkit. You should follow these steps in order to create such banners:

1. When the Adform Creative Toolkit is installed, all the Adform components are placed in your Adobe Flash installation directory. You are able to see them by selecting Window Components in the Top Menu.

2. Drag and drop the AdformCore component on the stage.

3. Insert Event calls on specific events which you want to track:

AdformCore.ADFevent('event_id', 'event_name');

event_id - it is a whole number between 1 and 19 and represents unique events in the banner.

event_name - static string (do not use dynamic values).

4. Example of using the Adform event tracking:

a) In case you are using ActionScript 2:

button.onRelease = function() {
AdformCore.ADFevent('1', 'banner click');
// Calling the ADFevent() function which transfers the event data to Adform servers
};

b) In case you are using the ActionScript 3:

button.addEventListener(MouseEvent.CLICK,ADFevent1);
function ADFevent1(e:Event):void {
AdformCore.ADFevent('1', 'banner click');
}

5. An event cannot be called immediately when a banner is loaded (in the first frame). It should be called only after the user's interaction with the banner (e.g. mouse over, dragging object, playing video on mouse over, and etc.).

6. Banners should be compiled with the Flash 8 or a higher version. There might be pop-up blocker problems when interacting with the lower version banners in the Internet Explorer 7.

7. Test the Flash banner and events in the live web environment using Adform Creative Test Module.

Events with dynamic values

It is possible to pass some custom values using the Custom Adform Events:

1. Drag and drop the AdformCore component on the stage.

2. Insert Event calls on specific events which you want to track:

AdformCore.ADFevent('event_id', 'event_name', eventVars);

event_id - it is a whole number between 1 and 19 and represents unique events in the banner.

event_name - static string (do not use dynamic values).

eventVars - (Object) Object with custom variables, which should be assigned for current event. Variable names are limited to the following - bv1, bv2, ... , bv100. Their values should be "String" type.

Example of eventVars:

var eventVars:Object = {

   bv1: "John",

   bv2: "Colin",

   bv3: "24"

}

a) In case you are using the ActionScript 2:

var eventVars:Object = {
  bv1: "John",
  bv2: "Colin",
  bv3: "24"
 };
button.onRelease = function() {
AdformCore.ADFevent('1', 'banner click', eventVars);
// Calling the ADFevent() function which transfers the event data including variables to Adform servers
};

b) In case you are using the ActionScript 3:

var eventVars:Object = {
  bv1: "John",
  bv2: "Colin",
  bv3: "24"
 };
button.addEventListener(MouseEvent.CLICK,ADFevent1);
function ADFevent1(e:Event):void {
AdformCore.ADFevent('1', 'banner click', eventVars);
}