Class AnalyticsEvent
java.lang.Object
com.codename1.analytics.AnalyticsEvent
An immutable analytics event: a named action with an optional category and
an ordered set of parameters. Build one via create(String):
Analytics.event(AnalyticsEvent.create("tutorial_complete")
.category("onboarding")
.param("step", "checkout")
.param("seconds", 42)
.build());
Name your own events. The purchase family is emitted for you when a
receipt completes, so sending one by hand counts the transaction twice.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic AnalyticsEvent.BuilderStarts building an event with the given name.The optional event category.getName()The event name.The event parameters as an unmodifiable, insertion-ordered map.longThe client timestamp in milliseconds since the epoch.
-
Method Details
-
create
Starts building an event with the given name.
Parameters
name: the event name, must not be null
Returns
a new builder
-
getName
The event name.
Returns
the name
-
getCategory
The optional event category.
Returns
the category or null
-
getParameters
-
getTimestamp
public long getTimestamp()The client timestamp in milliseconds since the epoch.
Returns
the timestamp
-