Helper class to build a map of hit parameters and values.
Examples:This will send a event hit type with the specified parameters and a custom dimension
parameter.
Tracker t = // get a tracker.
t.send(new HitBuilders.EventBuilder()
.setCategory("EventCategory")
.setAction("EventAction")
.setCustomDimension(1, "dimension1")
.build());
If you want to send a parameter with all hits, set it on Tracker directly.
This class is deprecated. This class has
been deprecated in favor of the new ScreenViewBuilder class. The two classes are
semantically similar but the latter is consistent across all the Google Analytics
platforms.
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.
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.
[[["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` is a helper class for creating hit parameter maps. To send data, create a builder object (e.g., `EventBuilder`, `SocialBuilder`) and use methods like `setCategory`, `setAction` to set parameters. Use `build()` to create the hit, then `send()` it via a tracker. Set parameters directly on the tracker for all hits, and override these values when sending specific hits. Builder objects are reusable. The nested class provides different builders for specific hit types.\n"]]