capture
abstract fun capture(distinctId: String, event: String, properties: Map<String, Any>? = null, userProperties: Map<String, Any>? = null, userPropertiesSetOnce: Map<String, Any>? = null, groups: Map<String, String>? = null, timestamp: Date? = null, appendFeatureFlags: Boolean = false)
Captures events
Parameters
distinct Id
the distinctId of the user performing the event
event
the event name
properties
the custom properties
user Properties
the user properties, set as a "$set" property, Docs https://posthog.com/docs/product-analytics/user-properties
user Properties Set Once
the user properties to set only once, set as a "$set_once" property, Docs https://posthog.com/docs/product-analytics/user-properties
groups
the groups, set as a "$groups" property, Docs https://posthog.com/docs/product-analytics/group-analytics
timestamp
the timestamp for the event
append Feature Flags
when true, enriches the event with feature flag properties
Captures events
Parameters
distinct Id
the distinctId
event
the event name
options
the capture options containing properties, userProperties, userPropertiesSetOnce, groups, and appendFeatureFlags
Captures events
Parameters
event
the event name
distinct Id
the distinctId