Skip to main content

Overview

Encore measures offer impact by joining your subscription events back to the offer exposures it recorded for the same person. Until those events reach Encore, the Analytics section of your dashboard shows no data. The whole integration reduces to one rule: one stable customer id everywhere.
Using a third-party subscription manager? If RevenueCat manages your subscriptions, it can carry these events for you: see RevenueCat.

Step 1: Identify before you show offers

Call identify() with your own stable customer id, before any offer is presented:
The id you pass becomes the app account id that keys every exposure and claim Encore records; it is the value getAppAccountId() returns. Without identify(), the SDK falls back to an auto-generated anonymous id that your server cannot reproduce later, so those exposures can never link back. Identify as soon as you know who the user is, and always before show().

Step 2: Forward subscription events with the same id

Whenever a subscription event happens in your billing system (subscribe, renew, cancel, and so on), your server POSTs it to https://api.encorekit.com/encore/webhooks/encore with:
  • user.app_account_id: the same customer id from step 1, byte-identical
  • subscription.original_transaction_id: your biller’s subscription id
  • event_type: the matching Encore verb, for example did_subscribe or did_renew
The full contract (HMAC auth headers, the buildEncoreHeaders signing helper, the payload schema, the verb list, and responses) lives in the Webhook Ingestion reference. This step only composes it:

Gotchas

  • Byte-identical id. user.app_account_id must equal the identify() id exactly; any prefixing, casing, or trimming difference breaks the join silently.
  • Identify before show, not after. Exposures recorded before identify() are keyed to the anonymous id and are not retro-linked; a late identify leaves them unattributed.
  • Resolve the id server-side. Read the customer id from your own auth session or subscription records, never from the client request body: a spoofed id attributes someone else’s subscription.
  • Every event carries the id. user.app_account_id is required on every event, not just the first; an event without it is acknowledged but dropped. See how the join works.
  • Use the canonical verbs. An unrecognized event_type is accepted and stored but cannot be projected into measurement; map your biller’s events to the verb list.

Next Steps

You’ve completed the Encore web integration. Here’s what to explore next: