> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encorekit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Vanilla JavaScript

> Integrate the Encore Web SDK without a build system: load the UMD bundle via a script tag (global Encore, unwrap with Encore.default), then configure()/identify()/show().

For pages without a bundler, load the UMD build via a script tag. The bundle exposes a
global `Encore`; the SDK instance lives on `.default` — unwrap it once.

## Load the script

Self-host `dist/umd/encore.min.js` from the npm package with your own assets (see
[Install](/publishers/web/quickstart/install) for the hosted-CDN note):

```html theme={null}
<script src="/vendor/encore.min.js"></script>
```

## Configure, identify, show

```html theme={null}
<script>
  // The UMD global exposes the SDK instance on .default
  var EncoreSDK = Encore.default || Encore;

  EncoreSDK.configure({ apiKey: 'pk_live_yourpublishablekey' });

  // After login:
  EncoreSDK.identify('user-123'); // replaces the auto-generated anonymous UUID

  document.getElementById('cancel-btn').addEventListener('click', async function () {
    const result = await EncoreSDK.placement('cancel_flow').show(); // never rejects
    if (result.status !== 'claimed') {
      proceedWithCancellation(); // 'dismissed' or 'unavailable' — continue your flow
    }
  });
</script>
```

Full configuration options: [`configure()`](/publishers/web/sdk-reference/configure).

## Next steps

* [Redemption Modes](/publishers/web/guides/redemption-modes) — deferred vs immediate claim flows
* [Thank-You Layout](/publishers/web/guides/thank-you-layout) — post-purchase placements
* [`show()`](/publishers/web/sdk-reference/show) — the full `ShowResult` contract
