Classes

analytics.Config
Provides support for reading and manipulating the configuration of the library. Obtain a instance using the analytics.Service#getConfig.
analytics.EventBuilder
A class that aids in the building of event hits. Create instances of this class using analytics.EventBuilder#builder.
analytics.GoogleAnalytics
Service object providing access to analytics.Tracker and analytics.Config objects.

An instance of this can be obtained using analytics.getService.

analytics.ParameterMap
A map of analytics.Parameter to analytics.Value. Individual parameters are identified by name (the query parameter name). Two different instances of Parameter with the same .name are treated as identical independent of all other attributes in the analytics.Parameter typedef.

As of this writing multiple values per parameter are not supported, though this aspect of GA tracking behavior needs to be verified. So this aspect of the API as well as the associated types are subject to change.

analytics.Tracker
Provides support for sending hits to Google Analytics using convenient named methods like sendAppView and sendEvent or the general purpose send method.

Clients can set session values using set. These values, once set, are included in all subsequent hits.

For analytics hittypes that are not supported by a named method clients can call send with param/value Object describing the hit. Obtain a instance using the analytics.Service#getTracker.


Enumerations

analytics.HitTypes :
The type of hit.
Constants:
EVENT
No description.
APPVIEW
No description.
SOCIAL
No description.
TRANSACTION
No description.
ITEM
No description.
TIMING
No description.
EXCEPTION
No description.
analytics.Parameters :
All supported public hit parameters excepting DIMENSION[0-199] and METRIC[0-199] which must be created with a user supplied index.
Constants:
EVENT_VALUE
No description.
EVENT_LABEL
No description.
ANONYMIZE_IP
No description.
HIT_TYPE
No description.
QUEUE_TIME
No description.
CACHE_BUSTER
No description.
SESSION_CONTROL
No description.
USER_ID
No description.
DESCRIPTION
No description.
EVENT_CATEGORY
No description.
EVENT_ACTION
No description.
NON_INTERACTION
No description.
TITLE
No description.
APP_ID
No description.
APP_INSTALLER_ID
No description.
SOCIAL_NETWORK
No description.
SOCIAL_ACTION
No description.
SOCIAL_TARGET
No description.
TRANSACTION_ID
No description.
TRANSACTION_AFFILIATION
No description.
TRANSACTION_REVENUE
No description.
TRANSACTION_SHIPPING
No description.
TRANSACTION_TAX
No description.
CURRENCY_CODE
No description.
ITEM_PRICE
No description.
ITEM_QUANTITY
No description.
ITEM_CODE
No description.
ITEM_NAME
No description.
ITEM_CATEGORY
No description.
CAMPAIGN_SOURCE
No description.
CAMPAIGN_MEDIUM
No description.
CAMPAIGN_NAME
No description.
CAMPAIGN_KEYWORD
No description.
CAMPAIGN_CONTENT
No description.
CAMPAIGN_ID
No description.
GCLID
No description.
DCLID
No description.
PAGE_LOAD_TIME
No description.
DNS_TIME
No description.
TCP_CONNECT_TIME
No description.
SERVER_RESPONSE_TIME
No description.
PAGE_DOWNLOAD_TIME
No description.
REDIRECT_RESPONSE_TIME
No description.
TIMING_CATEGORY
No description.
TIMING_VAR
No description.
TIMING_VALUE
No description.
TIMING_LABEL
No description.
EX_DESCRIPTION
No description.
EX_FATAL
No description.
analytics.Results :
Well known results objects. Results with dynamic content cannot be declared here for obvious reasons.
Constants:
DEVICE_OFFLINE
No description.
PAYLOAD_TOO_BIG
No description.
RATE_LIMITED
No description.
SAMPLED_OUT
No description.
SENT
No description.
analytics.Status :
All known status codes.
Constants:
DEVICE_OFFLINE
No description.
PAYLOAD_TOO_BIG
No description.
RATE_LIMITED
No description.
SAMPLED_OUT
No description.
SENT
No description.
analytics.ValueTypes :
The type of value.
Constants:
BOOLEAN
No description.
CURRENCY
No description.
INTEGER
No description.
TEXT
No description.
FLOAT
No description.

Global Functions

analytics.createDimensionParam(index) !analytics.Parameter
Returns a new DIMENSION param.
Arguments:
index : number
Each dimension has an index configured in the Google Analytics admin console. This is that value. It must be between 1 and 200.
Returns: !analytics.Parameter  No description.
analytics.createMetricParam(index) !analytics.Parameter
Returns a new METRIC param.
Arguments:
index : number
Each metric has an index configured in the Google Analytics admin console. This is that value. It must be between 1 and 200.
Returns: !analytics.Parameter  No description.
analytics.getService(appName) !analytics.GoogleAnalytics
Returns a service instance for the named Chrome Platform App/Extension. Generally you'll only ever want to call this with a single name that identifies the host Chrome Platform App/Extension or extension using the library. This name is used to scope hits to your app on Google Analytics.
Arguments:
appName : string
The name of your Chrome Platform App/Extension. Though library could read the name of the app from the chrome manifest file as it does with the app version, the name may in fact be translated. For this reason the caller must supplied a name.
Returns: !analytics.GoogleAnalytics  No description.
analytics.resetForTesting()
Resets the global runtime state for the purposes of testing.

Global Properties

analytics.AppViewHit :
Typedef for analytics.HitTypes.APPVIEW hit types.
analytics.EventHit :
Typedef for analytics.HitTypes.EVENT hit types.
analytics.ExceptionHit :
Typedef for analytics.HitTypes.EXCEPTION hit types.
analytics.HitType :
A type alias for all HitType values.
analytics.ItemHit :
Typedef for analytics.HitTypes.ITEM hit types.
analytics.LIBRARY_VERSION :
The current version of this library. Should be increased whenever we make a major change to the library.
analytics.Parameter :
A Parameter instance.
analytics.Result :
No description.
analytics.SocialHit :
Typedef for analytics.HitTypes.SOCIAL hit types.
analytics.Timing :
No description.
analytics.TimingHit :
Typedef for analytics.HitTypes.TIMING hit types.
analytics.TransactionHit :
Typedef for analytics.HitTypes.TRANSACTION hit types.
analytics.Value :
A value associated with a parameter.
analytics.ValueType :
A type alias for all ValueType values.
analytics.extras :
No description.
analytics.filters :
No description.
analytics.testing :
No description.

Package

Package Reference