User Identification
Link sessions to your users to easily find and debug their issues.
Why identify users?
- Search by user – Find all sessions for a specific user when they report an issue
- Support integration – Link sessions to your helpdesk tickets
- User journey – See all sessions from the same user over time
Basic Identification
Call identify() after your user logs in:
// After successful loginfunc onLoginSuccess(user: User) {PipeKit.shared.identify(userId: user.id)}// Or with just an email
Additional User Data
Add more context about your users with custom properties:
PipeKit.shared.setUserInfo(["userId": user.id,"email": user.email,"name": user.displayName,"plan": user.subscriptionPlan,"company": user.companyName,"signupDate": user.createdAt.description])
Searchable properties
The userId and email fields are searchable in the dashboard. Other properties are displayed in session details.
Clear User on Logout
When a user logs out, clear their identification to avoid mixing sessions:
func onLogout() {// Clear user identificationPipeKit.shared.clearUserInfo()// Optionally stop and upload the current sessionPipeKit.shared.stopRecording()}
Anonymous Users
For users who haven't logged in, you can still track them with a device ID:
// Use device identifier for anonymous usersimport UIKitlet deviceId = UIDevice.current.identifierForVendor?.uuidString ?? "unknown"PipeKit.shared.identify(userId: "anon_\(deviceId)")// Or generate your own anonymous IDlet anonymousId = UserDefaults.standard.string(forKey: "anonymousUserId")?? UUID().uuidStringUserDefaults.standard.set(anonymousId, forKey: "anonymousUserId")PipeKit.shared.identify(userId: anonymousId)
Best Practices
✓ Use stable identifiers
Use your internal user ID or email. Avoid identifiers that change (like session tokens).
✓ Identify early
Call identify() as soon as you know who the user is, ideally before or right after startRecording().
✓ Don't include PII in user properties
Avoid storing sensitive data like passwords, SSNs, or credit card numbers in user properties.
Next: Privacy & Masking
Learn how to protect sensitive data and user privacy in recordings.
Continue to Privacy →