Identifying Users
Pass customer data to RetainQ so you can track who's churning.
Why Identify Users?
- Skip the email collection step (better UX for the customer)
- Track repeat cancellers across multiple sessions
- Get AI churn risk scores per customer
- See full customer history in your dashboard
How to Pass User Data
Add this script before the RetainQ widget script loads:
<script>
window.RetainQ = {
user: {
id: "your_internal_user_id", // Required for cross-session tracking
email: "customer@example.com", // Required
name: "Jane Smith" // Optional, used in notifications
}
};
</script>
<!-- Then the widget script -->
<script src="https://app.retainq.com/widget.js" data-flow="..." data-trigger="..."></script>Fields
| Field | Type | Description |
|---|---|---|
id | string | Your internal user/customer ID. Used to link sessions across visits. |
email | string | Customer's email. Used for identity, notifications, and analytics. |
name | string | Display name. Shows in notifications and feedback log. |
Anonymous vs Identified
| Feature | Anonymous | Identified |
|---|---|---|
| Flow works | Yes | Yes |
| Email step shown | Yes | Skipped |
| Cross-session tracking | No | Yes |
| Churn risk score | No | Yes |
| Repeat canceller detection | No | Yes |
Dynamic Identification (SPAs)
For single-page apps where user data loads after the page, you can set it dynamically:
// After your user loads from your auth system
window.RetainQ = {
user: { id: currentUser.id, email: currentUser.email, name: currentUser.name }
};