Packagecom.remitoffoli.gaff
Classpublic class PageTracker

This class is the main logic for the GAFF project.

GAFF (Google Analytics For Flex/Flash) is an open-source project witch goal is to provide an easy way to use Google Analytics with ActionScript.

See also

http://code.google.com/p/gaff/


Public Properties
 PropertyDefined by
  name : String
[read-only] The name property has to correspond to the JavaScript PageTracker propertie name.
PageTracker
Public Methods
 MethodDefined by
  
PageTracker(name:String)
Constructor.
PageTracker
  
_setVar(newVal:String):void
This method allow you to add a custom value to filter your analytics results.
PageTracker
  
_trackPageview(... arguments):void
With this method you add page view to your Google Analytics account/profile.
PageTracker
  
getPageTracker(name:String = "pageTracker"):PageTracker
[static] This static method returns a PageTracker object wich name is the name argument value.
PageTracker
Property detail
nameproperty
name:String  [read-only]

The name property has to correspond to the JavaScript PageTracker propertie name.

The default name of the tracker given by GA (Google Analytics) during the creation of a new account or profile is pageTracker.

Implementation
    public function get name():String

See also

Constructor detail
PageTracker()constructor
public function PageTracker(name:String)

Constructor.

You must use getPageTracker static method to create or retrieve already created PageTracker instances.

Parameters
name:String

See also

Method detail
_setVar()method
public function _setVar(newVal:String):void

This method allow you to add a custom value to filter your analytics results.

Parameters
newVal:String — The value of pageTracker's custom value.
_trackPageview()method 
public function _trackPageview(... arguments):void

With this method you add page view to your Google Analytics account/profile.

Parameters
... arguments — One or more (comma separated) expressions.

Example
The following code will track a view for the page /myApp/general/page02 :
         var pageTracker:PageTracker = PageTracker.getPageTracker();
         pageTracker._trackPageview("myApp","general","page02");
         

getPageTracker()method 
public static function getPageTracker(name:String = "pageTracker"):PageTracker

This static method returns a PageTracker object wich name is the name argument value.

If there is no PageTracker instance corresponding to this name, the method will return a new PageTracker instance.

Parameters
name:String (default = "pageTracker")

Returns
PageTracker — A PageTracker object wich name is the name argument value.

See also