Platform

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 identifyUser() after your user logs in:

UserLogin.swift
import PipeKit
// After successful login
func onLoginSuccess(user: User) {
PipeKit.identifyUser(
userId: user.id,
email: user.email,
name: user.displayName
)
}
// Or with just a user ID
PipeKit.identifyUser(userId: "[email protected]")

Additional User Data

Add more context about your users with custom properties. Pass extra fields via additionalInfo on identifyUser(), or set arbitrary properties with setUserInfo():

UserInfo.swift
// Pass extra fields when you identify
PipeKit.identifyUser(
userId: user.id,
email: user.email,
name: user.displayName,
additionalInfo: [
"plan": user.subscriptionPlan,
"company": user.companyName,
]
)
// Or set arbitrary user properties
PipeKit.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.

Reset User on Logout

When a user logs out, end the current session and reset their identification to avoid mixing sessions across users:

UserLogout.swift
func onLogout() {
// Stop (and upload) the current session
PipeKit.stopSession()
// Reset identification for the next user
PipeKit.setUserInfo([:])
}

Anonymous Users

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

AnonymousUser.swift
// Use device identifier for anonymous users
import UIKit
import PipeKit
let deviceId = UIDevice.current.identifierForVendor?.uuidString ?? "unknown"
PipeKit.identifyUser(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.identifyUser(userId: anonymousId)

Best Practices

✓ Use stable identifiers

Use your internal user ID or email. Avoid identifiers that change (like session tokens).

✓ Identify early

Call identifyUser() as soon as you know who the user is, ideally before or right after startSession().

✓ 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 →