Widget Customization
Customize the look, feel, and behavior of the Windback cancellation widget to match your brand.Themes
The widget ships with two built-in themes.Light Theme
Clean white background with dark text. Best for light-themed apps.
Dark Theme
Dark background with light text. Best for dark-themed apps.
Custom Cancel Reasons
By default, the widget shows a standard set of cancel reasons. You can customize these in Settings > Cancel Flow in your dashboard, or pass them programmatically:When
allowFreeText is true, the widget shows a text area for the customer to elaborate. This free-text feedback is sent to Windback and used by the AI to personalize recovery emails.Event Callbacks
Register callbacks to respond to widget events in your application:Callback Reference
onSubmit(data)
onSubmit(data)
Called when the customer submits their cancel reason. The
data object contains:The selected cancel reason ID (e.g.,
too_expensive).The human-readable cancel reason label.
Free-text feedback if provided. Empty string if not.
The retention offer the customer accepted, or
null if they declined all offers.The customer’s email address.
onDismiss()
onDismiss()
Called when the customer closes the widget without submitting a cancel reason. No data is passed. Use this to keep the customer on their current plan.
Required Fields
The widget requires certain data to function correctly:| Field | Required | Passed Via | Notes |
|---|---|---|---|
data-api-key | Yes | Script attribute | Your public key (pub_) |
customerEmail | Yes | Windback.show() | Needed to create the churn event |
customerName | No | Windback.show() | Improves personalization |
planName | No | Windback.show() | Shown in retention offers |
mrr | No | Windback.show() | Used for revenue impact tracking |