Packagecom.google.analytics.campaign
Classpublic class CampaignTracker

Campaign tracker object. Contains all the data associated with a campaign. AdWords: The following variables name, source, medium, term, content are automatically generated for AdWords hits when autotagging is turned on through the AdWords interface. note: we can not use a CampaignInfo because here the serialization to URL have to be injected into __utmz and is then a special case. links: Understanding campaign variables: The five dimensions of campaign tracking http://www.google.com/support/googleanalytics/bin/answer.py?answer=55579&hl=en How does campaign tracking work? http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55540 What is A/B Testing and how can it help me? http://www.google.com/support/googleanalytics/bin/answer.py?answer=55589 What information do the filter fields represent? http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55588



Public Properties
 PropertyDefined by
  clickId : String
google ad click id variable: utmgclid
CampaignTracker
  content : String
The content dimension describes the version of an advertisement on which a visitor clicked.
CampaignTracker
  id : String
The campaign code or id can be used to refer to a campaign lookup table, or chart of referring codes used to define variables in place of multiple request query tags.
CampaignTracker
  medium : String
Method of Delivery.
CampaignTracker
  name : String
Usually refers to name given to the marketing campaign or is used to differentiate campaign source.
CampaignTracker
  source : String
The resource that provided the click.
CampaignTracker
  term : String
The term or keyword is the word or phrase that a user types into a search engine.
CampaignTracker
Public Methods
 MethodDefined by
  
CampaignTracker(id:String = "", source:String = "", clickId:String = "", name:String = "", medium:String = "", term:String = "", content:String = "")
Creates a new CampaingTracker instance.
CampaignTracker
  
isValid():Boolean
Returns a flag indicating whether this tracker object is valid.
CampaignTracker
  
toTrackerString():String
Format for tracker have the following fields (seperated by "|"):
utmcsr - campaign source
utmccn - campaign name
utmcmd - campaign medium
utmctr - keywords
utmcct - ad content description
utmcid - lookup table id
utmgclid - google ad click id
CampaignTracker
Property detail
clickIdproperty
public var clickId:String

google ad click id variable: utmgclid

contentproperty 
public var content:String

The content dimension describes the version of an advertisement on which a visitor clicked.

It is used in content-targeted advertising and Content (A/B) Testing to determine which version of an advertisement is most effective at attracting profitable leads.

Alternative: Used for A/B testing and content-targeted ads to differentiate ads or links that point to the same URL.

variable: utmcct

idproperty 
public var id:String

The campaign code or id can be used to refer to a campaign lookup table, or chart of referring codes used to define variables in place of multiple request query tags. variable: utmcid

mediumproperty 
public var medium:String

Method of Delivery. The medium helps to qualify the source; together, the source and medium provide specific information about the origin of a referral. For example, in the case of a Google search engine source, the medium might be "cost-per-click", indicating a sponsored link for which the advertiser paid, or "organic", indicating a link in the unpaid search engine results. In the case of a newsletter source, examples of medium include "email" and "print". Other examples: "Organic", "CPC", or "PPC". variable: utmcmd

nameproperty 
public var name:String

Usually refers to name given to the marketing campaign or is used to differentiate campaign source. The campaign name differentiates product promotions such as "Spring Ski Sale" or slogan campaigns such as "Get Fit For Summer". alternative: Used for keyword analysis to identify a specific product promotion or strategic campaign. variable: utmccn

sourceproperty 
public var source:String

The resource that provided the click. Every referral to a web site has an origin, or source. Examples of sources are the Google search engine, the AOL search engine, the name of a newsletter, or the name of a referring web site. Other example: "AdWords". variable: utmcsr

termproperty 
public var term:String

The term or keyword is the word or phrase that a user types into a search engine. Used for paid search. variable: utmctr

Constructor detail
CampaignTracker()constructor
public function CampaignTracker(id:String = "", source:String = "", clickId:String = "", name:String = "", medium:String = "", term:String = "", content:String = "")

Creates a new CampaingTracker instance.

Parameters
id:String (default = "")
 
source:String (default = "")
 
clickId:String (default = "")
 
name:String (default = "")
 
medium:String (default = "")
 
term:String (default = "")
 
content:String (default = "")
Method detail
isValid()method
public function isValid():Boolean

Returns a flag indicating whether this tracker object is valid. A tracker object is considered to be valid if and only if one of id, source or clickId is present.

Returns
Boolean
toTrackerString()method 
public function toTrackerString():String

Format for tracker have the following fields (seperated by "|"):

utmcsr - campaign source
utmccn - campaign name
utmcmd - campaign medium
utmctr - keywords
utmcct - ad content description
utmcid - lookup table id
utmgclid - google ad click id

Returns
String