'reduceChurn'.
The complete pattern
An example fitness app, FitTracker, whose exclusive offer is an extended 1-month free trial (vs the standard 7 days), unlocked by claiming the brand offer:show() ·
placement().
Requires the current
@encorekit/web-sdk 2.x release. Upgrading an existing integration:
Updating to 2.x.Sequencing your own offer
The brand tab opens in the background the moment the user claims, and your page keeps focus, so your checkout is what the user sees next. Open it as soon as the result resolvesclaimed, while the reason they claimed is still fresh.
Your checkout and the brand handoff are independent from here. The user might complete
yours, theirs, both, or neither, and none of those outcomes changes what
show() already resolved: the claim is a fact the
moment it happens.
Wire up analytics
The flow above drives trials, but Encore can only credit them to the offer if your subscription events join back to the exposures it recorded. Identify the user with your stable customer id (as in the setup above) and forward your subscription events to Encore with that same id. Configure Analytics is the quickstart step that wires it up.Gotchas
- Identify before
show(). CallEncore.identify()with your stable customer id before presenting the offer; that id is what links later subscription events to the offer cohort. Exposures recorded beforeidentify()are not retro-linked. See Configure Analytics. - Never block the cancel flow. When the user dismisses the offer, your own fallback path
must let them proceed. Branch on the result, and treat
dismissedandunavailableidentically here. - Persist
transactionId. It carries the attribution for a completion that lands days later. It is optional on the result, because the transaction write can fail while the claim genuinely happened, so handle its absence without treating the claim as failed. unavailableis not an error. It means no eligible offers, or a measurement control cohort. Show your normal exit path.- A claim is not a conversion. Brand completion is asynchronous and server-authoritative; never gate access on the client result.
Related
- The Claim Flow: what a claim does, and what its payload carries.
- Reduce Churn: the canonical description of this use case.
show()·placement()- Updating to 2.x: moving off the two-phase flow.