Docs

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

FieldTypeDescription
idstringYour internal user/customer ID. Used to link sessions across visits.
emailstringCustomer's email. Used for identity, notifications, and analytics.
namestringDisplay name. Shows in notifications and feedback log.

Anonymous vs Identified

FeatureAnonymousIdentified
Flow worksYesYes
Email step shownYesSkipped
Cross-session trackingNoYes
Churn risk scoreNoYes
Repeat canceller detectionNoYes

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 }
};