DocsSDKsIdentity and people
SDKsOfficial

Identity and people

Connect anonymous activity to a known user, reset identity on logout, and update profile fields.

Source of truthsdk/sankofa_flutter/lib/sankofa_flutter.dart

Identify a known user

await Sankofa.instance.identify('user_123');

When the user changes from the anonymous ID to a known ID, the SDK queues an alias transport item that links the previous ID to the new one.

Reset on logout

await Sankofa.instance.reset();

Reset clears the current user identity, creates a new anonymous ID, and creates a new session ID.

Set people properties

await Sankofa.instance.peopleSet({
  'plan': 'growth',
  'company_name': 'ThrivnMe',
  'role': 'operator',
});

People updates use the people transport and target the current distinct_id.

Practical identity model

  1. 1

    Track anonymous events first

    Let the SDK generate and persist the anonymous ID while the user is not authenticated.

  2. 2

    Call identify once identity is known

    This creates the alias transport item so existing anonymous activity can be stitched to the user.

  3. 3

    Use peopleSet for durable profile facts

    Plan, role, region, account type, and other profile-level attributes belong in people updates instead of every event payload.

Backend transport mapping

SDK methodCore endpoint
identify()POST /api/v1/alias
peopleSet()POST /api/v1/people
track()POST /api/v1/track