Identify Users

Map anonymous guests to known users across web and mobile so journeys, profiles, and analytics stay continuous from first visit through login.

Introduction

Before login, SDKs operate on a server-issued guest_id. After login, identify / logIn stitches that history to your user_id. Call this as soon as your auth succeeds.

Why identify users?

  • Unify pre-login browsing with post-login profiles
  • Power personalized journeys and messaging
  • Attribute conversions to the correct customer
  • Enable logout to rotate guest identity cleanly

Web identity model

  • device_id — permanent fingerprint (survives logout)
  • guest_id — server-issued on /device/register; rotates on logout
  • user_id — set after identify; cleared on logout
  • onUserLogin reads Site.Identity / Email or top-level Identity / Email
onUserLogin (recommended)javascript
growise.onUserLogin({
  Site: {
    Identity: 'usr_99812',
    Name: 'Sarah Connor',
    Email: 'sarah@example.com',
    Phone: '+15550199',
  },
  Subscription: 'Enterprise',
})
identifyjavascript
await growise.identify('usr_99812', {
  name: 'Sarah Connor',
  email: 'sarah@example.com',
})

Android & Flutter

Androidkotlin
GrowWise.logIn(
    userId = "user_12345",
    traits = mapOf(
        "Name" to "Jane Doe",
        "Email" to "jane@example.com",
        "membership" to "Premium"
    )
)

GrowWise.logout()
Flutterdart
await GrowWise.logIn(
  'user_12345',
  {
    'Name': 'Jane Doe',
    'Email': 'jane@example.com',
    'membership': 'Premium',
  },
);

await GrowWise.logout();

Best practices

  • Use a stable unique user id (never rotate casually)
  • Identify immediately after login/signup
  • Always logout on sign-out so guest_id rotates
  • Web: wait for device register (guest_id) before identify if you see skips
  • Prefer traits that help messaging (email, name, plan) without PII you cannot justify