com.brsanthu.googleanalytics
Class TransactionHit

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

public class TransactionHit
extends GoogleAnalyticsRequest<TransactionHit>

GA request to track ecommerce transaction.

For more information, see GA Parameters Reference

Author:
Santhosh Kumar

Field Summary
 
Fields inherited from class com.brsanthu.googleanalytics.GoogleAnalyticsRequest
customDimentions, customMetrics, parms
 
Constructor Summary
TransactionHit()
           
TransactionHit(String txId)
           
TransactionHit(String txId, Double txRevenue)
           
TransactionHit(String txId, String txAffiliation, Double txRevenue)
           
TransactionHit(String txId, String txAffiliation, Double txRevenue, Double txShipping, Double txTax, String currencyCode)
           
TransactionHit(String txId, String txAffiliation, Double txRevenue, String currencyCode)
           
 
Method Summary
 String currencyCode()
           
 TransactionHit currencyCode(String value)
          
 String txAffiliation()
           
 TransactionHit txAffiliation(String value)
          
 String txId()
           
 TransactionHit txId(String value)
          
 Double txRevenue()
           
 TransactionHit txRevenue(Double value)
          
 Double txShipping()
           
 TransactionHit txShipping(Double value)
          
 Double txTax()
           
 TransactionHit txTax(Double 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, expirementId, expirementId, expirementVariant, expirementVariant, 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, userAgent, userAgent, userIp, userIp, userLanguage, userLanguage, viewportSize, viewportSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TransactionHit

public TransactionHit()

TransactionHit

public TransactionHit(String txId)

TransactionHit

public TransactionHit(String txId,
                      Double txRevenue)

TransactionHit

public TransactionHit(String txId,
                      String txAffiliation,
                      Double txRevenue)

TransactionHit

public TransactionHit(String txId,
                      String txAffiliation,
                      Double txRevenue,
                      String currencyCode)

TransactionHit

public TransactionHit(String txId,
                      String txAffiliation,
                      Double txRevenue,
                      Double txShipping,
                      Double txTax,
                      String currencyCode)
Method Detail

txId

public TransactionHit 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 TransactionHit 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 TransactionHit 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 TransactionHit 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 TransactionHit 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()

currencyCode

public TransactionHit 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()


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