Identify users
Use identity methods to associate the current app session with a known user and update visitor properties used for targeting and analysis.
Identify a userโ
Screeb.setIdentity(
userId = "user_123",
properties = mapOf(
"email" to "dev@screeb.app",
"plan" to "pro",
"company" to "Screeb",
),
)
You can also pass the identity during initialization:
Screeb.initSdk(
channelId = "<YOUR_CHANNEL_ID>",
userId = "user_123",
properties = mapOf("plan" to "pro"),
)
Update visitor propertiesโ
Screeb.setProperties(
mapOf(
"role" to "admin",
"trial" to false,
),
)
Reset identityโ
Call resetIdentity when a user logs out.
Screeb.resetIdentity()
Read current identityโ
val identity = Screeb.getIdentity()