Class Overview
A Builder object to build event hits. For meaningful data, event hits should contain at least
the event category and the event action.
Summary
[Expand]
Inherited Methods |
From class
com.google.android.gms.analytics.HitBuilders.HitBuilder
T
|
addImpression(Product product, String impressionList)
Adds a product impression to the hit.
|
T
|
addProduct(Product product)
Adds product information to be sent with a given hit.
|
T
|
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
T
|
set(String paramName, String paramValue)
Sets the value for the given parameter name.
|
final
T
|
setAll(Map<String, String> params)
Adds a set of key, value pairs to the hit builder.
|
T
|
setCampaignParamsFromUrl(String utmParams)
Parses and translates utm campaign parameters to analytics campaign param
and returns them as a map.
|
T
|
setCustomDimension(int index, String dimension)
Adds a custom dimension to the current hit builder.
|
T
|
setCustomMetric(int index, float metric)
Adds a custom metric to the current hit builder.
|
T
|
setHitType(String hitType)
Sets the type of the hit to be sent.
|
T
|
setNewSession()
|
T
|
setNonInteraction(boolean nonInteraction)
|
T
|
setProductAction(ProductAction action)
Sets a product action for all the products included in this hit.
|
T
|
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()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
Public Constructors
public
HitBuilders.EventBuilder
()
public
HitBuilders.EventBuilder
(String category, String action)
Convenience constructor for creating an event hit. Additional fields can be specified
using the setter methods.
Parameters
category
| Category in which the event will be filed. Example: "Video" |
action
| Action associated with the event. Example: "Play"
|
Public Methods