Google is committed to advancing racial equity for Black communities. See how.


public static class HitBuilders.TransactionBuilder extends HitBuilder<HitBuilders.TransactionBuilder>

This class was deprecated.
This class has been deprecated in favor of a richer set of APIs on all the HitBuilder classes. With the new approach, simply use addProduct, addImpression, addPromo and setAction to add ecommerce data to any of the hits.

Transaction hit builder allows you to send in-app purchases and sales to Google Analytics. Transaction Id, affiliation and revenue are required for meaningful reports on transaction data.

Public Constructor Summary

Public Method Summary

setAffiliation(String affiliation)
setCurrencyCode(String currencyCode)
setRevenue(double revenue)
setShipping(double shipping)
setTax(double tax)
setTransactionId(String transactionid)

Inherited Method Summary

Public Constructors

public HitBuilders.TransactionBuilder ()

Public Methods

public HitBuilders.TransactionBuilder setAffiliation (String affiliation)

public HitBuilders.TransactionBuilder setCurrencyCode (String currencyCode)

public HitBuilders.TransactionBuilder setRevenue (double revenue)

public HitBuilders.TransactionBuilder setShipping (double shipping)

public HitBuilders.TransactionBuilder setTax (double tax)

public HitBuilders.TransactionBuilder setTransactionId (String transactionid)