Skip to main content
The Encore Web SDK (@encorekit/web-sdk) presents targeted offers in your web app. A complete integration is three calls:
In the default deferred redemption mode, a fourth call, redeem(), fires the advertiser redirect after your own conversion step.
New to the SDK? Start with the Web Quickstart. This section is the per-method contract reference.

Initialization

configure()

Initialize with your publishable key; set redemptionMode, logLevel

User identity

identify()

Attach your stable user id (replaces the auto-generated anonymous UUID)

setUserAttributes()

Merge user attributes for offer targeting

reset()

Clear local SDK state on logout; generates a fresh anonymous id

Offer presentation

show()

Present the offer carousel (phase 1); resolves a bare ShowResult

redeem()

Fire the advertiser redirect for a pending claim (phase 2, deferred mode)

placement()

Named placements with per-surface UI options and scoped redeem

Errors

EncoreError, error codes, and the never-rejects contract

Utility getters

MethodReturns
getVersion()SDK version string
isConfigured()Whether configure() succeeded
getConfiguration()Read-only snapshot of the live config (or null)
getCurrentUserId()Current user id: yours or the anonymous UUID (or null)
getAppAccountId()The account id claims and events bind to (same value as above)
getUserAttributes()The merged attribute set
setLogLevel(level)Switch 'none'/'debug' logging at runtime

Entitlements are server-side

The SDK exposes no client-side entitlement checks; real access is server-authoritative. Verify a user’s entitlements from your backend via Encore’s HMAC-authenticated server-side entitlements API, which reflects conversions verified on Encore’s side, asynchronously.