Skip to main content

API Reference

MethodDescription
init(B2MetricConfig config)Initializes the SDK. Must be called once, before any other method.
logEvent(name, {properties, itemProperties})Enqueues an event for delivery.
setUser(B2MetricUser user)Identifies the current user and updates their profile.
registerPushToken(token, provider)Registers a push notification token.
trackPushOpened([metadata])Marks that a push notification was opened.
flush()Sends all queued events immediately.
destroy()Releases SDK resources. init() must be called again before further use.