User Identification
B2Metric.setUser({
userId: 'user_123',
name: 'Ahmet',
email: 'ahmet@example.com',
plan: 'premium',
})
setUser sends a user_identify event and merges attributes into user_properties on every subsequent event. userId is required; any additional custom attribute is also accepted.
Note
Device-collected properties always win a key collision with a user attribute. User attributes are not persisted across restarts — call setUser again after each app launch.