fr | en | es | de

AS3 sites

Discover the latest tools in the
Analytics Suite, thanks to our new online help.

Contents: Hide

The emergence of ActionScript version 3.0 has completely changed the way ActionScript programming is implemented. Not only does the new version of the language adopt a different syntax, but it has been entirely thought out and designed for object oriented developments.

With this information in mind and with the emergence of videos/audio players which are increasingly programmed in AS3, AT Internet has completely rethought its approach to tagging Flash items.

This document presents both how to implement a tag on a full Flash website (i.e. one where all of the content is presented in a single Flash animation, located on a single URL) and in a Rich Media player.

Here are the general steps that need to be followed:

When using this xml file, any change made to the variables does not require any change to be made to the Flash animation's FLA source file.


We recommend that you place a "standard" JavaScript code on the page which hosts the swf film. This then makes it possible to retrieve information such as browser specific data, the referrer (source), etc.

Content of the AS3 tagging library

The AS3 tagging library is available ONLY UPON REQUEST from the Support centre via the interface.

In addition to this implementation guide, the AS3 tagging library provides you with:


Inserting calls into existing AS files

Depending on measurement needs, all you need to do is insert the following line:



XiTiTag is a function which is created in one of the as files in the AS3 tagging library. Only "Flag_Name" needs to be changed and adapted to match the desired measurement (see point 4).

The image shown below presents an existing as code to which two XiTiTag.loadXml() calls have been added with flag names "Play_video" and "Stop_video1". These calls are used to generate a Rich Media measurement with a "play" and "stop" action (see the Rich Media tag code).



Assign names which are sufficiently explicit to the flags, whilst bearing in mind that you will need to configure their properties to be measured in the xititag.xml file.
If the Flash animation calls (XiTiTag.loadXml(….)) a flag which is not declared in the xml file, nothing will happen.

Irrespective of the item being measured (clicks, Rich Media elements, impressions etc,) and the method used (xt_med, xt_rm, xtadc…), you can insert additional dynamic variables during the measurement phase.

This example shows how a dynamic variable (“nameflv”) is created so that a content name can be changed (“myvideo1” or “myvideo2”):


Creating the xititag.xml File

An example of the xititag.xml file is provided in the AS3 tagging library:

<?xml  version="1.0" encoding="iso-8859-1"?>


<tags xtsd="http://log"  xtsite="32"  xtn2="17">


<! -- video launch -->

<tag  key="Play_video1"  xtprich="page_with_video" xts2rich="3"  xtrm="video,4,video1,play,0,2,3000,4,1,1,int,clip,1000,8"  />

<tag  key="Stop_video1"  xtprich="page_with_video" xts2rich="3"  xtrm="video,4,video1,stop" />




<! -- General parameters defintion -->






It is made up of:

Measurable items

Measuring a click

A tag must be used so that clicks can be measured. The tag must contain the xt_med variable that expects the same content as the JavaScript xt_med() function (used for standard web page measurement):

<tag key="clic1" xt_med="C,level2,click_name,clickType" />




This will create a Navigation click named "Movie1" stored in the drama chapter, which is part of the movie chapter, stored in the DVD chapter and in level 2 ID "3".


If the click is to open another URL (to leave the Flash film), you can then place this URL in the xt_med variable. The example below measures an exit click (named "exit_website") and makes it possible to open the site in a new window ("newWin") with the site: To stop this new site from opening in a new window, simply remove "newWin".

Structure of the dynamic variables

In order to dynamically control each xt_med() variable all you need to do is populate them in the following names:

type: type of the item to be tracked. Enter the value of ‘C’ to show that it is a click measurement.

xtn2: level 2 site in which the content is stored.

clicname: click label (use “::” if necessary).

clic : type of click to be tracked (with 4 values to be entered: S for Exit, N for Navigation, T for Download and A for Action).

url: to specify a destination URL after a click (optional).

window: enter the value ‘newWin’ if a new window opens after a click (optional).

Measuring a Rich Media item and its actions

The Rich Media measurement is a fairly complete one: a document which is dedicated to this measurement is available in your "Support Centre" interface. The general principle is to be able to measure all of the actions performed on Rich Media players, whether it be audio, video or animation.


Triggering the measurement

Rich Media measurements use a tag which includes the xt_rm variable and which expects the same content as the JavaScript xt_rm() function used for standard web page measurements (see ii.) This tag can also contain the xtprich and xts2rich variables which respectively contain the label of the page hosting the player and its level 2.

Each tag corresponds to an action performed on the Rich Media player: play, pause, stop, etc.

i.e. <tag key="video_action" xt_rm="richmedia_variables" xtprich="mapage" xts2rich="level2"/>


<tag key="video_action" xt_rm="richmedia_variables" xtprich="mapage" xts2rich="level2"/>




This will measure a "play" action associated with the "myvideo" video stored in the "chap" theme which is in turn stored in level 2 "4". Please refer to the next paragraph to find out what all of the parameters of the xt_rm variable mean.

This example also shows that the video is hosted on the "video_page" page which belongs to level 2 "3".


All of a media's characteristics do not have to be sent with every call. For example, with the "pause" or "stop" actions, we may assume that the media's characteristics have already been sent: the xt_rm() call is therefore made easier.

Structure of variables

Here is a list of all of the variables that you will need in order to get the most out of this measurement.






Compulsory - Content type ("audio", "video", "animation" or "vpost" for post-roll advert measurements).


Player ID


Content label that is associated with a post-roll advert ("vpost")


Level 2 site in which the content is placed.


Compulsory - Content label (using "::" if necessary, to establish a themed tree structure).


Compulsory - Text ID which characterises an action amongst predefined actions (see appendix).

refresh count

Duration of refresh count (optional, and measured in seconds). For content with a long duration, this variable can be used to generate automatic intermediate hits (between the "play" hit and the "stop" hit) which provide a more accurate measurement of the duration.


Total length of the content, measured in seconds (leave empty if mode="live"). This variable is compulsory if action="Play" and mode="Clip". Must be less than 86400.


Buffering in process (buf=1)


Position of the read head.


Quality ID OR slide number if type="animation".


Feed ID.


Location of the content ("int" for internal or "ext" for external).


Broadcast ("live" for content that is broadcast continuously and without a duration of time, or "clip" for the contents that have a duration). If "type=Animation", then by entering "mode=Live" it is possible to obtain the total playback duration (not relative to “duration”). If mode is empty the method which is taken into consideration for broadcasting is "clip".


Size of content (integer in Kb, leave empty if mode="live").


Format of the content (predefined ID – see Appendix).

Measuring a new scene to simulate a "page view"

Depending on the structure of your Flash scenes, you can identify them as "page views": this makes it possible to simulate navigation (order in which pages are viewed) based on the pages viewed.

Using the "page views" measurement is strongly recommended so that the maximum number of our analysis options can be used.

As is the case with standard JavaScript tags, the page measurement requires at least a page name and a level 2 (if this structure was chosen).

In this example, two flags were created and will produce two pages in the interface ("Login" and "Listing" which are stored in the "Product" chapter) which will in turn be stored in level 2 "17".


Simply call these two flags at the beginning of the appropriate scenes. In this case one scene presents a login page and another scene, a product list.

As is the case with standard JavaScript web measurements, it is possible to add several pieces of information. Version 2.0.001 of our AS3 measurement system allows you to use more variables, including:

These two variables do not need to be added to every page flag; they are unique to each visit: as soon as a value for xtan is identified, it is assigned to the current visit.

As stated in point 3, if this value is a dynamic value in the fla source code, you can add it directly to the XiTiTag.loadXml() call as the second variable.

This leads to: XiTiTag.loadXml("page3","&xtan="+UserID+"&xtac="+UserCat)

In this case you do not need to declare xtan or xtac in the xml file.


If you define a value for xtan in the XiTiTag.loadXml() call AND in the xml file, it is the value which will have been added as the variable that takes priority over the xml file value.

Measuring clicks and impressions on banners belonging to third party sites (advertisers)

Clicks (xt_adc method)

In order to track a click the use of a tag which contains the xt_adc variable.The xt_adc variable must have the same content as the xt_ad() JavaScript function, which is specific to the ad tracking feature (for further details, please refer to the “On site ads” tagging guide).

<tag key="AdName" xt_adc="PUB-B-C-D-E-F-G-H-J" />


Structure of the variables


A= PUB (prefix used for Publisher)

B= Campaign ID ([name] or id[name])


C= Creation ([name] or id[name])

D= Variant ([name] or id[name])

E= Format (predefined ID. You can also specify any other format by using the following nomenclature: "[name]". For example:you can specify either a name [button], or a size [120x40])

F= General placement (we will predefine the ID text ; with the format [name])

G= Detailed placement ([name] or id[name])

H= Advertiser ID (with the format id[name])

J= URL (represents the URL that the link redirects to. By definition this is associated with the advertiser ID.)


Impressions (xt_adi method)

Tracking an impression requires the use of a tag, which contains the xt_adi variable, which must have the same content as the xt_adc variable.

<tag key="AdName" xt_adi="PUB-B-C-D-E-F-G-H-J" />