Summary: Ctors | Methods | Inherited Methods | [Expand All]
public static class

# HitBuilders.ItemBuilder

extends HitBuilder<HitBuilders.ItemBuilder>

java.lang.Object
↳ | com.google.android.gms.analytics.HitBuilders.HitBuilder<com.google.android.gms.analytics.HitBuilders.ItemBuilder>
| ↳ | com.google.android.gms.analytics.HitBuilders.ItemBuilder

This class is 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.

## Class Overview

Item hit builder allows you to send item level sales data to Google Analytics. Transaction Id, Item Name, SKU price and quantity are required for meaningful reports on item data.

## Summary

Public Constructors
| HitBuilders.ItemBuilder()

Public Methods
HitBuilders.ItemBuilder | setCategory(String category)
HitBuilders.ItemBuilder | setCurrencyCode(String currencyCode)
HitBuilders.ItemBuilder | setName(String name)
HitBuilders.ItemBuilder | setPrice(double price)
HitBuilders.ItemBuilder | setQuantity(long quantity)
HitBuilders.ItemBuilder | setSku(String sku)
HitBuilders.ItemBuilder | setTransactionId(String transactionid)

[Expand] Inherited Methods
From class com.google.android.gms.analytics.HitBuilders.HitBuilder
HitBuilders.ItemBuilder | addImpression(Product product, String impressionList) Adds a product impression to the hit.
HitBuilders.ItemBuilder | addProduct(Product product) Adds product information to be sent with a given hit.
HitBuilders.ItemBuilder | addPromotion(Promotion promotion) Adds promotion related information to the hit.
Map<String, String> | build() Builds a `Map` of parameters and values that can be set on the `Tracker` object.
String | get(String paramName)
final HitBuilders.ItemBuilder | set(String paramName, String paramValue) Sets the value for the given parameter name.
final HitBuilders.ItemBuilder | setAll(Map<String, String> params) Adds a set of key, value pairs to the hit builder.
HitBuilders.ItemBuilder | setCampaignParamsFromUrl(String utmParams) Parses and translates utm campaign parameters to analytics campaign parameters and returns them as a map.
HitBuilders.ItemBuilder | setCustomDimension(int index, String dimension) Adds a custom dimension to the current hit builder.
HitBuilders.ItemBuilder | setCustomMetric(int index, float metric) Adds a custom metric to the current hit builder.
HitBuilders.ItemBuilder | setHitType(String hitType) Sets the type of the hit to be sent.
HitBuilders.ItemBuilder | setNewSession()
HitBuilders.ItemBuilder | setNonInteraction(boolean nonInteraction)
HitBuilders.ItemBuilder | setProductAction(ProductAction action) Sets a product action for all the products included in this hit.
HitBuilders.ItemBuilder | setPromotionAction(String action) Adds an action associated with the promotions in a given hit.
From class java.lang.Object
Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)
final void | wait()

## Public Constructors

#### public HitBuilders.ItemBuilder ()

## Public Methods

#### public HitBuilders.ItemBuilder setCategory (String category)

#### public HitBuilders.ItemBuilder setCurrencyCode (String currencyCode)

#### public HitBuilders.ItemBuilder setName (String name)

#### public HitBuilders.ItemBuilder setPrice (double price)

#### public HitBuilders.ItemBuilder setQuantity (long quantity)

#### public HitBuilders.ItemBuilder setSku (String sku)

#### public HitBuilders.ItemBuilder setTransactionId (String transactionid)