Quick Start
Start the SDK once, as early as possible — e.g. in your App init or AppDelegate:
import B2MAnalyticsSDK
B2MAnalytics.shared.start(
apiKey: "YOUR_API_KEY",
appIdentifier: "my_app"
)
// Track events anywhere in your app
B2MAnalytics.shared.logEvent(name: "button_clicked", properties: [
"screen": AnyCodable("home")
])
Note
appIdentifier must be lowercase snake_case: it starts with a letter and contains only a-z, 0-9 and single _ separators.