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("purchase")
.category("commerce")
.param("sku", "abc-123")
.param("value", 9.99)
.build());
-
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
-