Packagecom.google.analytics.core
Classpublic class GIFRequest

Google Analytics Tracker Code (GATC)'s GIF request module. This file encapsulates all the necessary components that are required to generate a GIF request to the Google Analytics Back End (GABE).



Public Properties
 PropertyDefined by
  utmac : String
[read-only] Account String.
GIFRequest
  utmcc : String
[read-only] Cookie values.
GIFRequest
  utmhn : String
[read-only] Host Name, which is a URL-encoded string.
GIFRequest
  utmn : String
[read-only] Unique ID generated for each GIF request to prevent caching of the GIF image.
GIFRequest
  utmsp : String
[read-only] Sample rate
GIFRequest
  utmwv : String
[read-only] Tracking code version

Example : utmwv=1

GIFRequest
Public Methods
 MethodDefined by
  
Creates a new GIFRequest instance.
GIFRequest
  
onComplete(event:Event):void
GIFRequest
  
onIOError(event:IOErrorEvent):void
GIFRequest
  
onSecurityError(event:SecurityErrorEvent):void
GIFRequest
  
send(account:String, variables:Variables = null, force:Boolean = false, rateLimit:Boolean = false):void
Send the Gif Request to the server(s).
GIFRequest
  
sendRequest(request:URLRequest):void
GIFRequest
  
updateToken():void
Updates the token in the bucket.
GIFRequest
Property detail
utmacproperty
utmac:String  [read-only]

Account String. Appears on all requests.

Example : utmac=UA-2202604-2

Implementation
    public function get utmac():String
utmccproperty 
utmcc:String  [read-only]

Cookie values. This request parameter sends all the cookies requested from the page. ex: utmcc=__utma%3D117243.1695285.22%3B%2B__utmz%3D117945243.1202416366.21.10.utmcsr%3Db%7Cutmccn%3D(referral)%7Cutmcmd%3Dreferral%7Cutmcct%3D%252Fissue%3B%2B note: you first get each cookie __utma=117243.1695285.22; __utmz=117945243.1202416366.21.10.utmcsr=b|utmccn=(referral)|utmcmd=referral|utmcct=%2Fissue; the rhs can already be URLencoded , see for ex %2Fissue is for /issue you join all the cookie and separate them with + __utma=117243.1695285.22;+__utmz=117945243.1202416366.21.10.utmcsr=b|etc the you URLencode all __utma%3D117243.1695285.22%3B%2B__utmz%3D117945243.1202416366.21.10.utmcsr%3Db%7Cetc

Implementation
    public function get utmcc():String
utmhnproperty 
utmhn:String  [read-only]

Host Name, which is a URL-encoded string.

Example : utmhn=x343.gmodules.com

Implementation
    public function get utmhn():String
utmnproperty 
utmn:String  [read-only]

Unique ID generated for each GIF request to prevent caching of the GIF image.

Example : utmn=1142651215

Implementation
    public function get utmn():String
utmspproperty 
utmsp:String  [read-only]

Sample rate

Implementation
    public function get utmsp():String
utmwvproperty 
utmwv:String  [read-only]

Tracking code version

Example : utmwv=1

Implementation
    public function get utmwv():String
Constructor detail
GIFRequest()constructor
public function GIFRequest(config:Configuration, debug:DebugConfiguration, buffer:Buffer, info:Environment)

Creates a new GIFRequest instance.

Parameters
config:Configuration
 
debug:DebugConfiguration
 
buffer:Buffer
 
info:Environment
Method detail
onComplete()method
public function onComplete(event:Event):voidParameters
event:Event
onIOError()method 
public function onIOError(event:IOErrorEvent):voidParameters
event:IOErrorEvent
onSecurityError()method 
public function onSecurityError(event:SecurityErrorEvent):voidParameters
event:SecurityErrorEvent
send()method 
public function send(account:String, variables:Variables = null, force:Boolean = false, rateLimit:Boolean = false):void

Send the Gif Request to the server(s).

Parameters
account:String
 
variables:Variables (default = null)
 
force:Boolean (default = false)
 
rateLimit:Boolean (default = false)
sendRequest()method 
public function sendRequest(request:URLRequest):voidParameters
request:URLRequest
updateToken()method 
public function updateToken():void

Updates the token in the bucket. This method first calculates the token delta since the last time the bucket count is updated. If there are no change (zero delta), then it does nothing. However, if there is a delta, then the delta is added to the bucket, and a new timestamp is updated for the bucket as well. To prevent spiking in traffic after a large number of token has accumulated in the bucket (after a long period of time), we have added a maximum capacity to the bucket. In other words, we will not allow the bucket to accumulate token passed a certain threshold.