java.lang.Object | |
↳ | com.google.android.gms.analytics.HitBuilders.HitBuilder<T extends com.google.android.gms.analytics.HitBuilders.HitBuilder> |
![]()
HitBuilders.AppViewBuilder,
HitBuilders.EventBuilder,
HitBuilders.ExceptionBuilder,
HitBuilders.ItemBuilder,
HitBuilders.ScreenViewBuilder,
HitBuilders.SocialBuilder,
HitBuilders.TimingBuilder,
HitBuilders.TransactionBuilder
|
Internal class to provide common builder class methods. The most important methods from this class are the setXYZ and build methods. These methods can be used to set individual properties on the hit and then build it so that it is ready to be passed into the tracker.
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds a product impression to the hit.
| |||||||||||
Adds product information to be sent with a given hit.
| |||||||||||
Adds promotion related information to the hit.
| |||||||||||
Sets the value for the given parameter name.
| |||||||||||
Adds a set of key, value pairs to the hit builder.
| |||||||||||
Parses and translates utm campaign parameters to analytics campaign param
and returns them as a map.
| |||||||||||
Adds a custom dimension to the current hit builder.
| |||||||||||
Adds a custom metric to the current hit builder.
| |||||||||||
Sets a product action for all the products included in this hit.
| |||||||||||
Adds an action associated with the promotions in a given hit.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Sets the type of the hit to be sent.
|
[Expand]
Inherited Methods | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Adds a product impression to the hit. The product can be optionally associated with a named impression list.
Adds product information to be sent with a given hit. The action provided in
setProductAction(ProductAction)
affects how the products passed in through this method get
processed.
Sets the value for the given parameter name. These values will be added to the hit when it is built. This function should only be used for advanced cases where none of the explicit setters do not work. This function should usually be called after all the explicit setter have been called.
paramName | The name of the parameter that should be sent over wire. This value should start with "&". |
---|---|
paramValue | The value to be sent over the wire for the given parameter. |
Adds a set of key, value pairs to the hit builder. These values will be added to the hit when it is built. This function should only be used for advanced cases where none of the explicit setters work. This function should usually be called after all the explicit setter have been called.
params | A map of all the values to be added to the builder. |
---|
Parses and translates utm campaign parameters to analytics campaign param and returns them as a map.
utmParams | url containing utm campaign parameters. |
---|
Example: http://my.site.com/index.html?utm_campaign=wow&utm_source=source utm_campaign=wow&utm_source=source.
For more information on auto-tagging, see http://support.google.com/googleanalytics/bin/answer.py?hl=en&answer=55590
For more information on manual tagging, see http://support.google.com/googleanalytics/bin/answer.py?hl=en&answer=55518 *
Adds a custom dimension to the current hit builder. Calling this method with the same index will overwrite the previous dimension with the new one. Refer http://goo.gl/igziD2 for details on how to set the custom dimensions up.
index | The index/slot in which the dimension will be set. |
---|---|
dimension | The value of the dimension for the given index. |
Adds a custom metric to the current hit builder. Calling this method with the same index will overwrite the previous metric with the new one. Refer http://goo.gl/igziD2 for details on how to set the custom metrics up.
index | The index/slot in which the metric will be set. |
---|---|
metric | The value of the metric for the given index. |
Sets a product action for all the products included in this hit. The action and its
associated properties affect how the products added through addProduct(Product)
are
processed.
Adds an action associated with the promotions in a given hit. Valid values for an action
are defined in Promotion
class.
Sets the type of the hit to be sent. This can be used to reuse the builder object for multiple hit types. See http://goo.gl/kMRwhS for possible hit values.
hitType | The value of the Hit. |
---|