Skip to main content

API Reference

MethodDescription
getInstance(context): B2MetricSDKReturns the singleton SDK instance.
start(config: B2MetricAnalyticsConfig)Initializes and configures the SDK.
logEvent(name, properties, itemProperties)Tracks a custom event.
setUser(user: B2MUser)Identifies the current user and updates their profile.
registerPushToken(token, provider: PushProvider)Registers a push notification token.
trackPushOpened(data: Map<String, String>)Tracks a push notification open.
flush()Sends all pending events immediately.
shutdown()Stops observers/coroutines after a final flush.