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:

User Login
// After successful login
func onLoginSuccess(user: User) {
PipeKit.shared.identify(userId: user.id)
}
// Or with just an email
PipeKit.shared.identify(userId: "[email protected]")

Additional User Data

Add more context about your users with custom properties:

swift
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:

User Logout
func onLogout() {
// Clear user identification
PipeKit.shared.clearUserInfo()
// Optionally stop and upload the current session
PipeKit.shared.stopRecording()
}

Anonymous Users

For users who haven't logged in, you can still track them with a device ID:

swift
// Use device identifier for anonymous users
import UIKit
let deviceId = UIDevice.current.identifierForVendor?.uuidString ?? "unknown"
PipeKit.shared.identify(userId: "anon_\(deviceId)")
// Or generate your own anonymous ID
let anonymousId = UserDefaults.standard.string(forKey: "anonymousUserId")
?? UUID().uuidString
UserDefaults.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 →