From September, Flash will no longer be supported by Chrome. Prepare for the shift towards HTML5 by visiting our Flash to HTML5 help page

Check it out!

Event Tracking

Event tracking (banner hosted by Adform)

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.

Important: Adform Creative Toolkit extension must be used while creating banners with the Adform event tracking as Adform Core component is a must to have on banner's stage. For opening this extenstion proceed to Window → Other Panels → Adform in your Flash API Top Menu once Adform Creative Toolkit is installed. The manual of Adform Creative Toolkit can be found here.

 

  • Events with static values

    Creative should follow these steps in order to create banners with event tracking:

    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:

    event_id - it is a integer number between 1 and 20 and represents unique/custom events in the banner. Reserved banner events IDs could be found here.
    event_name - static string (do not use dynamic values).

    4. 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.).

    5. 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.

    Examples of using the Adform event tracking

    ActionScript 2:

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

    ActionScript 3:

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

     

  • 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 20 and represents unique events in the banner. Reserved banner events IDs could be found here.
    event_name - static string (do not use dynamic values).
    eventVars - 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);
    }

     


Event tracking (banner hosted by Media)

When banner is hosted by media event tracking implementation is actually the same as described in steps above.  Banner must contain Adform Core component on stage, custom events defined in a banners actions code. The difference is that additional Adform campaign tracking  parameters values should be parsed along with custom events. 

Additional variables values that must be passed to banner from Adform system through swf object FlashVars:

  •  unique bn - banner tag number,
  • ADFcmpgnID - campaign ID,
  • ADFmembID - member ID,
  • ADFbanPlacID - placement ID,
  • ADFbanID - banner ID,
  • domain=http://track.adform.net/Banners/

Each parameter takes particular values depending on client's campaign setup. Invisible tag is created on Adform side and particular flashVars values are generated on tags level. For more details on this please contact [email protected].