Skip to content
Codeskop

Identify users

Tie events to your own user IDs so you can see how many people an issue affects and look up a specific user's problems.

Users tab on Growth and Scale

identify works on every plan and keeps issue user counts accurate. The Users tab and per-user history are included on the Growth and Scale plans. See User tracking & monitoring.

Identify and reset

Kotlin
import com.codeskop.sdk.core.Codeskop // After a successful login or sign-upCodeskop.identify(    userId = user.id,                       // your stable internal id    traits = mapOf("plan" to user.plan),    // optional, non-personal attributes) // On logoutCodeskop.reset()

Every event captured after identify carries that user. After reset, events are anonymous again.

Call it on every launch, not just at login

The SDK keeps the current user in memory only. When the app process restarts, it starts anonymous. So call identify in two places:

  1. right after a user logs in or signs up, and
  2. when your app starts and restores an existing session.
MyApplication.kt
class MyApplication : Application() {    override fun onCreate() {        super.onCreate()        CodeskopAndroid.init(this, CodeskopConfig(apiKey = BuildConfig.CODESKOP_KEY))         // Re-identify a user who is already signed in from a previous session        sessionStore.currentUser()?.let { user ->            Codeskop.identify(userId = user.id, traits = mapOf("plan" to user.plan))        }    }}

Calling identify again with the same ID is expected and harmless. Codeskop updates the same user and doesn't create a duplicate.

Choosing a user ID

  • Use a stable ID from your own system, such as your database's user ID.
  • Don't use an email address, phone number or name. Codeskop never needs them.
  • Keep traits non-personal. Plan, account tier or cohort are good. Values are sent as text.

Traits are sent as you pass them

Traits aren't redacted. Don't put anything in them you wouldn't want stored.

Before a user signs in

Anonymous events aren't lost. Every install has a random install ID (not tied to the device's hardware or advertising ID, and stored encrypted), and every event carries it. Before identify, events are attributed to that install; after it, they also carry your user ID. reset clears the user but keeps the install ID. Earlier anonymous events aren't retroactively merged into the user. More in Core concepts.

How users are counted

Each issue on the dashboard shows how many distinct users it affected. Codeskop counts your user ID when there is one, and otherwise the install. So calling identify makes these numbers match real people: one customer on two phones counts once, not twice.

What you see in the Users tab

The dashboard's Users tab lists the people using your app over the last 30 days: sessions, crashes, device, OS, country (from the device locale) and app version, plus each user's recent sessions and events.

  • Without identify, every install appears as an Anonymous install. Counts are still right per install, but one person on two phones shows up twice.
  • With identify, the row shows your user ID, and every install that person signs in on is grouped under it.

No extra setup is needed for the Users tab. It fills in from the events your app already sends. Only the user ID is stored for display; traits travel with events but aren't shown there.

Next steps