JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 48
  • Score
    100M100P100Q64906F
  • License UNLICENSED

Encore SDK for web applications - display targeted offers and manage user entitlements

Package Exports

  • @encorekit/web-sdk
  • @encorekit/web-sdk/dist/cjs/index.js
  • @encorekit/web-sdk/dist/esm/index.js
  • @encorekit/web-sdk/dist/umd/encore.min.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@encorekit/web-sdk) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Encore Web SDK

A JavaScript/TypeScript SDK that enables web applications to display targeted offers to users, granting them provisional access to premium features when they complete advertiser offers.

Features

  • 🎯 Targeted Offer Presentation - Display offers at critical moments (cancellation flows, paywalls, onboarding)
  • 🔐 Entitlement Management - Two-tier system (provisional + verified) for instant UX and reliable billing
  • 📱 Framework Agnostic - Works with React, Vue, Angular, Svelte, vanilla JavaScript, or any web framework
  • 🎨 Responsive UI - Beautiful, accessible modal interface that works on desktop and mobile
  • 📦 Lightweight - < 50KB gzipped bundle size
  • 🔌 Offline Support - Queues signals and syncs when connectivity restored
  • Accessible - WCAG 2.1 Level AA compliant

Installation

npm install @encore/web

Or via CDN:

<script src="https://encorekit.com/encore.min.js"></script>

Quick Start

import Encore from '@encore/web';

// Configure the SDK
Encore.configure({
  apiKey: 'your-api-key-here'
});

// Identify the user (optional)
Encore.identify('user-123', {
  email: 'user@example.com',
  subscriptionTier: 'free'
});

// Present an offer
const result = await Encore.presentOffer();
if (result.granted) {
  console.log('User granted entitlement:', result.entitlement);
  // Unlock premium feature
} else {
  console.log('User declined:', result.reason);
}

// Check if user has active entitlement
if (Encore.isActive({ type: 'freeTrial' })) {
  // Show premium content
}

Browser Support

  • Chrome/Edge (last 2 versions)
  • Firefox (last 2 versions)
  • Safari (last 2 versions)
  • iOS Safari 15+

Documentation