New!
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:
Place the correct files stored in this folder into your Flash workspace
Modify the Flash animation to insert flags which characterise the zones that you would like to have analysed as your film plays out
Implement an xml file (an example is provided in the compressed folder) in which all of the created flags are stored. Variables are also assigned to the flags.
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.
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:
AS3 source files: they must not be modified and must be placed in the same folder as your source Flash animation
The xititag.xml file which must contain all of the data which links the flags to the variables
Depending on measurement needs, all you need to do is insert the following line:
XiTiTag.loadXml("Flag_Name");
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”):
An example of the xititag.xml file is provided in the AS3 tagging library:
<?xml version="1.0" encoding="iso-8859-1"?>
<xiti>
<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" />
</tags>
<! -- General parameters defintion -->
<settings>
<url>.xiti.com/hit.xiti</url>
</settings>
</xiti>
It is made up of:
A <xiti> tag which contains two tags.
A <tags> tag which
contains all of the <tag> tags that define the flags present
in the as source files (see point 3). To find out more on all
of the variables which can be used in these <tag> tags (and
their meaning), see point 5.
Variables which are directly defined in the <tags> tag are, by
default, global values which are to be assigned to all <tag>
tags: this avoids having to repeat the site ID, level 2 ID etc, in
each tag. Only the xtn2 variable can be redefined in the <tag>
tags which simulate a page view.
A <settings> tag which in itself is made up of a <url> tag that characterises the collector domain (not to be changed).
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):
Variable C to show that this is a click measurement
The level 2 ID in which the click is stored
The click label (with chap1::chap2::chap3::page type naming)
The type of click to be measured (with the four following values: S for Exit, N for Navigation, T for Download and A for Action)
<tag key="clic1" xt_med="C,level2,click_name,clickType" />
Example:
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: http://www.site.com/otherpage.htm. 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).
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"/>
Example:
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.
xt_rm="type,plyr,clnk,xtn2,richname,action,custom,refresh,duration,buf,rmp,rmpf,quality,stream,location,mode,size,extension"
Variables |
Description |
type |
Compulsory - Content type ("audio", "video", "animation" or "vpost" for post-roll advert measurements). |
plyr |
Player ID |
clnk |
Content label that is associated with a post-roll advert ("vpost") |
xtn2 |
Level 2 site in which the content is placed. |
richname |
Compulsory - Content label (using "::" if necessary, to establish a themed tree structure). |
action |
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. |
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. |
buf |
Buffering in process (buf=1) |
rmp |
Position of the read head. |
rmbufp |
Quality ID OR slide number if type="animation". |
stream |
Feed ID. |
location |
Location of the content ("int" for internal or "ext" for external). |
mode |
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 |
Size of content (integer in Kb, leave empty if mode="live"). |
extension |
Format of the content (predefined ID – see Appendix). |
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:
"xtan": a variable to specify visitor ID (whenever the visitor is recognised)
"xtac": a category for the visitor who has been identified (these categories are managed directly in the configuration panel of your interface).
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.
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
Mandatory:
A= PUB (prefix used for Publisher)
B= Campaign ID ([name] or id[name])
Optional:
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" />
www.atinternet.com/support
© AT Internet - 2016 - All rights reserved