HitBuilders.EventBuilder
Stay organized with collections
Save and categorize content based on your preferences.
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
Inherited Method Summary
From class java.lang.Object
Object
|
clone()
|
boolean |
|
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 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" |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["`HitBuilders.EventBuilder` helps create event hits for Google Analytics tracking."],["Event hits should include at least a category and an action for meaningful data analysis."],["You can specify event details like category, action, label, and value using the builder's methods."],["A convenience constructor is available for creating an event hit with category and action pre-filled."],["It inherits functionalities from `HitBuilders.HitBuilder` for adding product and promotion data to the event."]]],["`HitBuilders.EventBuilder` constructs event hits, requiring at least an event category and action. It offers two constructors: one default and another accepting category and action strings. Key actions include `setAction`, `setCategory`, `setLabel`, and `setValue` to define event details. Inherited methods from `HitBuilder` enable adding product impressions, products, promotions, setting custom dimensions, metrics, campaign parameters, and managing hit types, allowing for detailed hit customization.\n"]]