Identify your logged-in visitors to maintain conversation history across devices and see who they are in your dashboard.
Quick Start (Basic)
The simplest way to identify visitors - just pass their info:
AckReply.identify({
email: 'john@example.com',
name: 'John Doe'
});Full Example
For complete identification with your internal user ID:
AckReply.identify({
user_id: 'customer_12345', // Your internal user ID
email: 'john@example.com',
name: 'John Doe',
avatar_url: 'https://example.com/john.jpg',
custom: {
plan: 'enterprise',
signup_date: '2024-01-15'
}
});Cross-Device Sync
When you provide a user_id, visitors with the same ID are automatically merged, even if they visit from different devices or browsers.
Logout
When a user logs out, call logout() to reset to an anonymous session:
AckReply.logout();Verified Identification (Advanced)
For high-security use cases, you can cryptographically verify visitor identity using HMAC signatures. This prevents malicious users from spoofing others.
1. Get Your Secret Key
Go to Settings -> Embed to find your Identity Secret.
2. Generate Signature (Backend)
Generate an HMAC-SHA256 signature on your backend using your secret key and the visitor's user_id.
// PHP Example
$userHash = hash_hmac('sha256', $userId, $identitySecret);3. Pass to Frontend
// Pass the signature as the second parameter
AckReply.identify({
user_id: 'customer_123',
email: 'john@example.com'
}, userHash);