Skip to main content
Identifying users lets you connect SDK sessions to real users in your system and target specific segments for studies.

Set an external ID

Link the SDK session to a user in your system. This is typically the user ID from your database or auth system.
PillowSDK.setExternalId("user_123")
Call this after login or whenever the user’s identity is known.
The external ID must not be blank.

Set user properties

Attach metadata to the user for targeting and segmentation.

String

PillowSDK.setUserProperty("plan", "pro")
PillowSDK.setUserProperty("role", "engineering")
PillowSDK.setUserProperty("locale", "en-US")

Boolean

PillowSDK.setUserProperty("email_verified", true)
PillowSDK.setUserProperty("beta_user", false)

Numeric

PillowSDK.setUserProperty("login_count", 7)        // Int
PillowSDK.setUserProperty("lifetime_value", 49.5)   // Double

Clear properties

// Remove a single property
PillowSDK.clearUserProperty("plan")

// Remove all properties
PillowSDK.clearAllProperties()

When to identify

EventAction
User logs inCall setExternalId() and set known properties
User updates profileCall setUserProperty() with new values
User logs outCall reset() to clear identity and start fresh
App launch (already logged in)Call setExternalId() again — the SDK deduplicates
You can call setExternalId() and setUserProperty() before or after a session is established. The SDK queues operations and sends them when the session is ready.