Page Summary
-
HitBuilders.EventBuilder is a builder object used to create event hits for analytics, requiring at least an event category and action for meaningful data.
-
It provides a convenience constructor that takes category and action strings as parameters for creating an event hit.
-
The class includes methods such as setAction, setCategory, setLabel, and setValue to specify additional fields for the event hit.
A Builder object to build event hits. For meaningful data, event hits should contain at least the event category and the event action.
Public Constructor Summary
Public Method Summary
| HitBuilders.EventBuilder | |
| HitBuilders.EventBuilder |
setCategory(String category)
|
| HitBuilders.EventBuilder | |
| HitBuilders.EventBuilder |
setValue(long value)
|
Inherited Method Summary
Public Constructors
public EventBuilder ()
public 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" |