Contents:
A representation of Campaign
Properties: _type – See TYPE_* constants, will be mapped to “__utmz” parameter. creation_time – Time of the creation of this campaign, will be mapped to “__utmz” parameter. response_count – Response Count, will be mapped to “__utmz” parameter.
Is also used to determine whether the campaign is new or repeated, which will be mapped to “utmcn” and “utmcr” parameters.
d_click_id – DoubleClick (?) Click ID. Will be mapped to “utmdclid” key in “__utmz” parameter. name – Name, a.k.a. “utm_campaign” query parameter for ga.js.
Will be mapped to “utmccn” key in “__utmz” parameter.
Represent a Custom Variable
Properties: index – Is the slot, you have 5 slots name – Name given to custom variable value – Value for the variable scope – Scope can be any one of 1, 2 or 3.
WATCH OUT: It’s a known issue that GA will not decode URL-encoded characters in custom variable names and values properly, so spaces will show up as “%20” in the interface etc. (applicable to name & value) http://www.google.com/support/forum/p/Google%20Analytics/thread?tid=2cdb3ec0be32e078
According to the GA documentation, there is a limit to the combined size of name and value of 64 bytes after URL encoding, see http://code.google.com/apis/analytics/docs/tracking/gaTrackingCustomVariables.html#varTypes and http://xahlee.org/js/google_analytics_tracker_2010-07-01_expanded.js line 563 This limit was increased to 128 bytes BEFORE encoding with the 2012-01 release of ga.js however, see http://code.google.com/apis/analytics/community/gajs_changelog.html
Represents an Event http://code.google.com/apis/analytics/docs/tracking/eventTrackerOverview.html
Properties: category – The general event category action – The action for the event label – An optional descriptor for the event value – An optional value associated with the event. You can see your
event values in the Overview, Categories, and Actions reports, where they are listed by event or aggregated across events, depending upon your report view.
Represents an Item in Transaction
Properties: order_id – Order ID, will be mapped to “utmtid” parameter sku – Product Code. This is the sku code for a given product, will be mapped to “utmipc” parameter name – Product Name, will be mapped to “utmipn” parameter variation – Variations on an item, will be mapped to “utmiva” parameter price – Unit Price. Value is set to numbers only, will be mapped to “utmipr” parameter quantity – Unit Quantity, will be mapped to “utmiqt” parameter
Contains all parameters needed for tracking a page
Properties: path – Page request URI, will be mapped to “utmp” parameter title – Page title, will be mapped to “utmdt” parameter charset – Charset encoding, will be mapped to “utmcs” parameter referrer – Referer URL, will be mapped to “utmr” parameter load_time – Page load time in milliseconds, will be encoded into “utme” parameter.
You should serialize this object and store it in the user session to keep it persistent between requests (similar to the “__umtb” cookie of the GA Javascript client).
Properties: session_id – A unique per-session ID, will be mapped to “utmhid” parameter track_count – The amount of pageviews that were tracked within this session so far,
will be part of the “__utmb” cookie parameter. Will get incremented automatically upon each request
start_time – Timestamp of the start of this new session, will be part of the “__utmb” cookie parameter
Will extract information for the “trackCount” and “startTime” properties from the given “__utmb” cookie value.
Properties: action – Required. A string representing the social action being tracked,
will be mapped to “utmsa” parameter
target – Optional. A string representing the URL (or resource) which receives the action.
Represents parameters for a Transaction call
Properties: order_id – Order ID, will be mapped to “utmtid” parameter affiliation – Affiliation, Will be mapped to “utmtst” parameter total – Total Cost, will be mapped to “utmtto” parameter tax – Tax Cost, will be mapped to “utmttx” parameter shipping – Shipping Cost, values as for unit and price, will be mapped to “utmtsp” parameter city – Billing City, will be mapped to “utmtci” parameter state – Billing Region, will be mapped to “utmtrg” parameter country – Billing Country, will be mapped to “utmtco” parameter items – @entity.Items in a transaction
item of type entities.Item
You should serialize this object and store it in the user database to keep it persistent for the same user permanently (similar to the “__umta” cookie of the GA Javascript client).
Properties: unique_id – Unique user ID, will be part of the “__utma” cookie parameter first_visit_time – Time of the very first visit of this user, will be part of the “__utma” cookie parameter previous_visit_time – Time of the previous visit of this user, will be part of the “__utma” cookie parameter current_visit_time – Time of the current visit of this user, will be part of the “__utma” cookie parameter visit_count – Amount of total visits by this user, will be part of the “__utma” cookie parameter ip_address – IP Address of the end user, will be mapped to “utmip” parameter and “X-Forwarded-For” request header user_agent – User agent string of the end user, will be mapped to “User-Agent” request header locale – Locale string (country part optional) will be mapped to “utmul” parameter flash_version – Visitor’s Flash version, will be maped to “utmfl” parameter java_enabled – Visitor’s Java support, will be mapped to “utmje” parameter screen_colour_depth – Visitor’s screen color depth, will be mapped to “utmsc” parameter screen_resolution – Visitor’s screen resolution, will be mapped to “utmsr” parameter
Updates the “previousVisitTime”, “currentVisitTime” and “visitCount” fields based on the given session object.
Will extract information for the “ip_address”, “user_agent” and “locale” properties from the given WSGI REQUEST META variable or equivalent.
Will extract information for the “unique_id”, “first_visit_time”, “previous_visit_time”, “current_visit_time” and “visit_count” properties from the given “__utma” cookie value.
Generates a hashed value from user-specific properties.
Generates a unique user ID from the current user-specific properties.