public class CreateOptions extends AnalyticsOptions
| Modifier and Type | Method and Description |
|---|---|
CreateOptions |
allowAnchorParameters(boolean allowAnchorParameters)
Optional.
|
CreateOptions |
allowLinkerParameters(boolean allowLinkerParameters)
Optional.
|
CreateOptions |
alwaysSendReferrer(boolean alwaysSendReferrer)
Optional.
|
CreateOptions |
clientId(String clientId)
Required for all hit types.
|
CreateOptions |
cookieDomain(String cookieDomain)
Optional.
|
CreateOptions |
cookieExpiration(int cookieExpiration)
Optional.
|
CreateOptions |
cookieName(String cookieName)
Optional.
|
CreateOptions |
legacyCookieDomain(String legacyCookieDomain)
Optional.
|
CreateOptions |
sampleRate(float sampleRate)
Optional.
|
CreateOptions |
siteSpeedSampleRate(int siteSpeedSampleRate)
Optional.
|
CreateOptions |
storage(Storage storage)
Sets the kind of storage to use.
|
CreateOptions |
trackerName(String trackerName)
Optional.
|
CreateOptions |
userId(String userId)
Optional.
|
appTrackingOptions, contentOptions, createOptions, customDimensionsAndMetricsOptions, customsOptions, eventsOptions, exceptionOptions, experimentsOptions, generalOptions, go, go, goAndLog, hitOptions, socialOptions, systemOptions, timingOptions, trafficSourcesOptionspublic CreateOptions allowAnchorParameters(boolean allowAnchorParameters)
create method.
By default, analytics.js will search for custom campaign parameters such as utm_source, utm_medium, etc. in both the query string and anchor of the current page's URL. Setting this field to false will result in ignoring any custom campaign parameters that appear in the anchor.
Default Value: truefalsepublic CreateOptions allowLinkerParameters(boolean allowLinkerParameters)
create method.
Setting this field to true will enables the parsing of cross-domain linker parmeters used to transfer state across domains.
Default Value: falsetruepublic CreateOptions alwaysSendReferrer(boolean alwaysSendReferrer)
create method.
By default the HTTP referrer URL, which is used to attribute traffic sources, is only sent when the hostname ofthe referring site differs from the hostname of the current page. Enable this setting only if you want to process other pages from your current host as referrals.
Default Value: falsetruepublic CreateOptions clientId(String clientId)
Anonymously identifies a browser instance. By default, this value is stored as part of the first-party analytics tracking cookie with a two-year expiration.
Default Value: Randomly Generated35009a79-1a05-49d7-b876-2b884d0f825bpublic CreateOptions cookieDomain(String cookieDomain)
create method.
Specifies the domain used to store the analytics cookie. Setting this to 'none' sets the cookie without specifying a domain.
Default Value: document.location.hostname (normalized)example.compublic CreateOptions cookieExpiration(int cookieExpiration)
create method.
Specifies the cookie expiration, in seconds.
Default Value: 63072000 (two years)86400public CreateOptions cookieName(String cookieName)
create method.
Name of the cookie used to store analytics data
Default Value: _gagaCookiepublic CreateOptions legacyCookieDomain(String legacyCookieDomain)
create method.
This field is used to configure how analytics.js searches for cookies generated by earlier Google Analytics tracking scripts such as ga.js and urchin.js.
Default Value: Nonestore.example.compublic CreateOptions sampleRate(float sampleRate)
create method.
Specifies what percentage of users should be tracked. This defaults to 100 (no users are sampled out) but large sites may need to use a lower sample rate to stay within Google Analytics processing limits.
Default Value: 1005public CreateOptions siteSpeedSampleRate(int siteSpeedSampleRate)
create method.
This setting determines how often site speed tracking beacons will be sent. By default, 1% of users will be automatically be tracked.Note: Analytics restricts Site Speed collection hits for a single property to the greater of 1% of users or 10K hits per day in order to ensure an equitable distribution of system resources for this feature.
Default Value: 150public CreateOptions trackerName(String trackerName)
create method.
Name of the tracker object.
Default Value: t0myTrackerpublic CreateOptions userId(String userId)
create method.
This is intended to be a known identifier for a user provided by the site owner/tracking library user. It may not itself be PII. The value should never be persisted in GA cookies or other Analytics provided storage.
Default Value: Noneas8eknlllpublic CreateOptions storage(Storage storage)
storage - - The type of storage.Copyright © 2015. All Rights Reserved.