com.brsanthu.googleanalytics
Class DefaultRequest

java.lang.Object
  extended by com.brsanthu.googleanalytics.GoogleAnalyticsRequest<DefaultRequest>
      extended by com.brsanthu.googleanalytics.DefaultRequest

public class DefaultRequest
extends GoogleAnalyticsRequest<DefaultRequest>

Default request that captures default value for any of the parameters. Create an instance of this object and specify as constructor parameter to GoogleAnalytics or set one any time using GoogleAnalytics.setDefaultRequest(DefaultRequest) method.

Author:
Santhosh Kumar

Field Summary
 
Fields inherited from class com.brsanthu.googleanalytics.GoogleAnalyticsRequest
customDimentions, customMetrics, parms
 
Constructor Summary
DefaultRequest()
           
DefaultRequest(String hitType)
           
DefaultRequest(String hitType, String trackingId, String appName, String appVersion)
           
 
Method Summary
 String currencyCode()
           
 DefaultRequest currencyCode(String value)
          
 Integer dnsTime()
           
 DefaultRequest dnsTime(Integer value)
          
 String eventAction()
           
 DefaultRequest eventAction(String value)
          
 String eventCategory()
           
 DefaultRequest eventCategory(String value)
          

Event Tracking

 String eventLabel()
           
 DefaultRequest eventLabel(String value)
          
 Integer eventValue()
           
 DefaultRequest eventValue(Integer value)
          
 String exceptionDescription()
           
 DefaultRequest exceptionDescription(String value)
          
 Boolean exceptionFatal()
           
 DefaultRequest exceptionFatal(Boolean value)
          
 String itemCategory()
           
 DefaultRequest itemCategory(String value)
          
 String itemCode()
           
 DefaultRequest itemCode(String value)
          
 String itemName()
           
 DefaultRequest itemName(String value)
          
 Double itemPrice()
           
 DefaultRequest itemPrice(Double value)
          
 Integer itemQuantity()
           
 DefaultRequest itemQuantity(Integer value)
          
 Integer pageDownloadTime()
           
 DefaultRequest pageDownloadTime(Integer value)
          
 Integer pageLoadTime()
           
 DefaultRequest pageLoadTime(Integer value)
          
 Integer redirectResponseTime()
           
 DefaultRequest redirectResponseTime(Integer value)
          
 Integer serverResponseTime()
           
 DefaultRequest serverResponseTime(Integer value)
          
 String socialAction()
           
 DefaultRequest socialAction(String value)
          
 String socialActionTarget()
           
 DefaultRequest socialActionTarget(String value)
          
 String socialNetwork()
           
 DefaultRequest socialNetwork(String value)
          
 Integer tcpConnectTime()
           
 DefaultRequest tcpConnectTime(Integer value)
          
 String txAffiliation()
           
 DefaultRequest txAffiliation(String value)
          
 String txId()
           
 DefaultRequest txId(String value)
          
 Double txRevenue()
           
 DefaultRequest txRevenue(Double value)
          
 Double txShipping()
           
 DefaultRequest txShipping(Double value)
          
 Double txTax()
           
 DefaultRequest txTax(Double value)
          
 String userTimingCategory()
           
 DefaultRequest userTimingCategory(String value)
          
 String userTimingLabel()
           
 DefaultRequest userTimingLabel(String value)
          
 Integer userTimingTime()
           
 DefaultRequest userTimingTime(Integer value)
          
 String userTimingVariableName()
           
 DefaultRequest userTimingVariableName(String value)
          
 
Methods inherited from class com.brsanthu.googleanalytics.GoogleAnalyticsRequest
adwordsId, adwordsId, anonymizeIp, anonymizeIp, applicationName, applicationName, applicationVersion, applicationVersion, cacheBuster, cacheBuster, campaignContent, campaignContent, campaignId, campaignId, campaignKeyword, campaignKeyword, campaignMedium, campaignMedium, campaignName, campaignName, campaignSource, campaignSource, clientId, clientId, contentDescription, contentDescription, customDimention, customDimention, customDimentions, customMetric, customMetric, custommMetrics, displayadId, displayadId, documentEncoding, documentEncoding, documentHostName, documentHostName, documentPath, documentPath, documentReferrer, documentReferrer, documentTitle, documentTitle, documentUrl, documentUrl, flashVersion, flashVersion, fromBoolean, fromDouble, fromInteger, getBoolean, getDouble, getInteger, getParameters, getString, hitType, hitType, isEmpty, javaEnabled, javaEnabled, nonInteractionHit, nonInteractionHit, parameter, parameter, protocolVersion, protocolVersion, queueTime, queueTime, screenColors, screenColors, screenResolution, screenResolution, sessionControl, sessionControl, setBoolean, setDouble, setInteger, setString, toBoolean, toDouble, toInteger, toString, trackingId, trackingId, userLanguage, userLanguage, viewportSize, viewportSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultRequest

public DefaultRequest()

DefaultRequest

public DefaultRequest(String hitType)

DefaultRequest

public DefaultRequest(String hitType,
                      String trackingId,
                      String appName,
                      String appVersion)
Method Detail

eventCategory

public DefaultRequest eventCategory(String value)

Event Tracking

Optional.

Specifies the event category. Must not be empty.

Parameter Value Type Default Value Max Length Supported Hit Types
ec text None 150 Bytes event
Example value: Category
Example usage: ec=Category


eventCategory

public String eventCategory()

eventAction

public DefaultRequest eventAction(String value)

Optional.

Specifies the event action. Must not be empty.

Parameter Value Type Default Value Max Length Supported Hit Types
ea text None 500 Bytes event
Example value: Action
Example usage: ea=Action


eventAction

public String eventAction()

eventLabel

public DefaultRequest eventLabel(String value)

Optional.

Specifies the event label.

Parameter Value Type Default Value Max Length Supported Hit Types
el text None 500 Bytes event
Example value: Label
Example usage: el=Label


eventLabel

public String eventLabel()

eventValue

public DefaultRequest eventValue(Integer value)

Optional.

Specifies the event value. Values must be non-negative.

Parameter Value Type Default Value Max Length Supported Hit Types
ev integer None None event
Example value: 55
Example usage: ev=55


eventValue

public Integer eventValue()

exceptionDescription

public DefaultRequest exceptionDescription(String value)

Optional.

Specifies the description of an exception.

Parameter Value Type Default Value Max Length Supported Hit Types
exd text None 150 Bytes exception
Example value: DatabaseError
Example usage: exd=DatabaseError


exceptionDescription

public String exceptionDescription()

exceptionFatal

public DefaultRequest exceptionFatal(Boolean value)

Optional.

Specifies whether the exception was fatal.

Parameter Value Type Default Value Max Length Supported Hit Types
exf boolean 1 None exception
Example value: 0
Example usage: exf=0


exceptionFatal

public Boolean exceptionFatal()

itemName

public DefaultRequest itemName(String value)

Required for item hit type.

Specifies the item name.

Parameter Value Type Default Value Max Length Supported Hit Types
in text None 500 Bytes item
Example value: Shoe
Example usage: in=Shoe


itemName

public String itemName()

itemPrice

public DefaultRequest itemPrice(Double value)

Optional.

Specifies the price for a single item / unit.

Parameter Value Type Default Value Max Length Supported Hit Types
ip currency 0 None item
Example value: 3.50
Example usage: ip=3.50


itemPrice

public Double itemPrice()

itemQuantity

public DefaultRequest itemQuantity(Integer value)

Optional.

Specifies the number of items purchased.

Parameter Value Type Default Value Max Length Supported Hit Types
iq integer 0 None item
Example value: 4
Example usage: iq=4


itemQuantity

public Integer itemQuantity()

itemCode

public DefaultRequest itemCode(String value)

Optional.

Specifies the SKU or item code.

Parameter Value Type Default Value Max Length Supported Hit Types
ic text None 500 Bytes item
Example value: SKU47
Example usage: ic=SKU47


itemCode

public String itemCode()

itemCategory

public DefaultRequest itemCategory(String value)

Optional.

Specifies the category that the item belongs to.

Parameter Value Type Default Value Max Length Supported Hit Types
iv text None 500 Bytes item
Example value: Blue
Example usage: iv=Blue


itemCategory

public String itemCategory()

currencyCode

public DefaultRequest currencyCode(String value)

Optional.

When present indicates the local currency for all transaction currency values. Value should be a valid ISO 4217 currency code.

Parameter Value Type Default Value Max Length Supported Hit Types
cu text None 10 Bytes transaction, item
Example value: EUR
Example usage: cu=EUR


currencyCode

public String currencyCode()

socialNetwork

public DefaultRequest socialNetwork(String value)

Required for social hit type.

Specifies the social network, for example Facebook or Google Plus.

Parameter Value Type Default Value Max Length Supported Hit Types
sn text None 50 Bytes social
Example value: facebook
Example usage: sn=facebook


socialNetwork

public String socialNetwork()

socialAction

public DefaultRequest socialAction(String value)

Required for social hit type.

Specifies the social interaction action. For example on Google Plus when a user clicks the +1 button, the social action is 'plus'.

Parameter Value Type Default Value Max Length Supported Hit Types
sa text None 50 Bytes social
Example value: like
Example usage: sa=like


socialAction

public String socialAction()

socialActionTarget

public DefaultRequest socialActionTarget(String value)

Required for social hit type.

Specifies the target of a social interaction. This value is typically a URL but can be any text.

Parameter Value Type Default Value Max Length Supported Hit Types
st text None 2048 Bytes social
Example value: http://foo.com
Example usage: st=http%3A%2F%2Ffoo.com


socialActionTarget

public String socialActionTarget()

userTimingCategory

public DefaultRequest userTimingCategory(String value)

Optional.

Specifies the user timing category.

Parameter Value Type Default Value Max Length Supported Hit Types
utc text None 150 Bytes timing
Example value: category
Example usage: utc=category


userTimingCategory

public String userTimingCategory()

userTimingVariableName

public DefaultRequest userTimingVariableName(String value)

Optional.

Specifies the user timing variable.

Parameter Value Type Default Value Max Length Supported Hit Types
utv text None 500 Bytes timing
Example value: lookup
Example usage: utv=lookup


userTimingVariableName

public String userTimingVariableName()

userTimingTime

public DefaultRequest userTimingTime(Integer value)

Optional.

Specifies the user timing value. The value is in milliseconds.

Parameter Value Type Default Value Max Length Supported Hit Types
utt integer None None timing
Example value: 123
Example usage: utt=123


userTimingTime

public Integer userTimingTime()

userTimingLabel

public DefaultRequest userTimingLabel(String value)

Optional.

Specifies the user timing label.

Parameter Value Type Default Value Max Length Supported Hit Types
utl text None 500 Bytes timing
Example value: label
Example usage: utl=label


userTimingLabel

public String userTimingLabel()

pageLoadTime

public DefaultRequest pageLoadTime(Integer value)

Optional.

Specifies the time it took for a page to load. The value is in milliseconds.

Parameter Value Type Default Value Max Length Supported Hit Types
plt integer None None timing
Example value: 3554
Example usage: plt=3554


pageLoadTime

public Integer pageLoadTime()

dnsTime

public DefaultRequest dnsTime(Integer value)

Optional.

Specifies the time it took to do a DNS lookup.The value is in milliseconds.

Parameter Value Type Default Value Max Length Supported Hit Types
dns integer None None timing
Example value: 43
Example usage: dns=43


dnsTime

public Integer dnsTime()

pageDownloadTime

public DefaultRequest pageDownloadTime(Integer value)

Optional.

Specifies the time it took for the page to be downloaded. The value is in milliseconds.

Parameter Value Type Default Value Max Length Supported Hit Types
pdt integer None None timing
Example value: 500
Example usage: pdt=500


pageDownloadTime

public Integer pageDownloadTime()

redirectResponseTime

public DefaultRequest redirectResponseTime(Integer value)

Optional.

Specifies the time it took for any redirects to happen. The value is in milliseconds.

Parameter Value Type Default Value Max Length Supported Hit Types
rrt integer None None timing
Example value: 500
Example usage: rrt=500


redirectResponseTime

public Integer redirectResponseTime()

tcpConnectTime

public DefaultRequest tcpConnectTime(Integer value)

Optional.

Specifies the time it took for a TCP connection to be made. The value is in milliseconds.

Parameter Value Type Default Value Max Length Supported Hit Types
tcp integer None None timing
Example value: 500
Example usage: tcp=500


tcpConnectTime

public Integer tcpConnectTime()

serverResponseTime

public DefaultRequest serverResponseTime(Integer value)

Optional.

Specifies the time it took for the server to respond after the connect time. The value is in milliseconds.

Parameter Value Type Default Value Max Length Supported Hit Types
srt integer None None timing
Example value: 500
Example usage: srt=500


serverResponseTime

public Integer serverResponseTime()

txId

public DefaultRequest txId(String value)

Required for transaction hit type.
Required for item hit type.

A unique identifier for the transaction. This value should be the same for both the Transaction hit and Items hits associated to the particular transaction.

Parameter Value Type Default Value Max Length Supported Hit Types
ti text None 500 Bytes transaction, item
Example value: OD564
Example usage: ti=OD564


txId

public String txId()

txAffiliation

public DefaultRequest txAffiliation(String value)

Optional.

Specifies the affiliation or store name.

Parameter Value Type Default Value Max Length Supported Hit Types
ta text None 500 Bytes transaction
Example value: Member
Example usage: ta=Member


txAffiliation

public String txAffiliation()

txRevenue

public DefaultRequest txRevenue(Double value)

Optional.

Specifies the total revenue associated with the transaction. This value should include any shipping or tax costs.

Parameter Value Type Default Value Max Length Supported Hit Types
tr currency 0 None transaction
Example value: 15.47
Example usage: tr=15.47


txRevenue

public Double txRevenue()

txShipping

public DefaultRequest txShipping(Double value)

Optional.

Specifies the total shipping cost of the transaction.

Parameter Value Type Default Value Max Length Supported Hit Types
ts currency 0 None transaction
Example value: 3.50
Example usage: ts=3.50


txShipping

public Double txShipping()

txTax

public DefaultRequest txTax(Double value)

Optional.

Specifies the total tax of the transaction.

Parameter Value Type Default Value Max Length Supported Hit Types
tt currency 0 None transaction
Example value: 11.20
Example usage: tt=11.20


txTax

public Double txTax()


Copyright © Sep 2013–2013 brsanthu Inc. All rights reserved.