'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() ·
redeem() ·
placement().
Requires the current
@encorekit/web-sdk 2.x release. Upgrading an existing integration:
Updating to 2.x.Sequencing your own offer
A claim on this placement is saved, and no brand tab opens yet, so your checkout comes next. Open it when the result resolvesclaimed, while the reason the user claimed is still
fresh. Call redeem() after your checkout is done:
the redemption screen’s button opens the brand’s tab. If your checkout leaves the page, call
it on the page the user lands on
(where the claim is kept).
Whether the user finishes your checkout, the brand’s offer, both, or neither, none of it
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 a 1.x integration onto 2.x.