Free customer support included.

We provide free customer support and will try to answer your questions to the best of our ability.

E. Tracking Flash websites

For tracking of flash sites you need to implement a specific OneStat script. This section of the manual describes how to do this.

To measure flash with you have to implement a specific flash script. By using the flash script you are able to measure individual flash movies and flash pages. This manual describes the procedure to implement the OneStat flash script.

The flash script code works only for Flash Versions 6 and 7. Flash 5 is not supported.

OneStat can be accessed from Macromedia Flash files v6 and up using the following files:

- (click here to download the zip file)
- onestat flash sample.html

A. How to implement the flash script

- Place the above files and "onestat flash sample.html" in the same directory as your flash file. Add the following line of code to your main flash file:

#include "" creates an object at the _global level. The object is called "OneStat" and contains all OneStat variables.

- Enter your OneStat account ID in
To register pageviews on your account you have to modify the code line:


to contain your OneStat account ID. Replace the XXXXXX with your account ID i.e. 223677. If you don't know your account ID, refer to the application email you received when applying for your OneStat account.

- Call the OneStat object in your flash code
The OneStat object is created by calling:


This function creates the OneStat object, initializes variables including title, URL and referrer from the browser (via a javascript/fscommand call). You only need to call this function once within the scope of your application. After the object is created, you can register a pageview anywhere in your application by calling:


The onestatPageView function registers a pageview based on the contents of the onestat object.

The proper strategy for using this function is changing the available variables such as osp_URL, osp_Title, CONTENTSECTION, PRODUCTCODE etc. and then calling onestatPageview().

For example, if you load a new movie into _level0, the new movie referenced as "About Us" should include the following code:

onestat.URL = "About Us";

Keep in mind that every time the play head passes the frame with the included code, a pageview will be registered. The function can also be called within click event handlers, scenes, etc.

An alternative strategy is to implement listeners which call the function as needed. By using listeners you can check if a (sub) file is completely loaded before registering a pageview.

1. Modify the onestat flash sample html file
When displaying your flash file in a browser, you must use the included "onestat flash sample.html". Replace all instances of "myFlash" in this file with the name of your Flash (swf) file. This file is needed for forwarding referrer information to the OneStat object. The referrer information is used to detect search engine information, search engine phrases and basic referrer info from the visitors of the site.

B. Variables of the OneStat object.

The following variables can be set. Please refer to the OneStat manual for more explanation about the OneStat script variables and using the OneStat Commerce module.

osp_Url (required)

The url registered for this flash movie. You can freely select a url i.e.  “Homepage”, “About”, “News”. URLs must be unique for each flash section you want to measure.  When 2 flash sections use the same url the pageviews are added to each other.


The title of the flash section. You can freely select a title i.e.   “Home”, “Latest News”. It is not required to select a unique title for each flash section.


The e-Commerce Action (optional)


The e-Commerce Transaction (optional)


The e-Commerce order amount (optional)


The e-Commerce product code (optional)


The e-Commerce product group (optional)


The e-Commerce ad campaign (optional)