Three ways to add Returning.AI loyalty widgets to your platform. Choose based on your requirements.
Need it live in under 10 minutes?
Drop-in Web Components with automatic auth, Shadow DOM isolation, and framework adapters. The fastest path to a working widget.
CMS or static site with no build step?
Paste a single iframe tag into any HTML page. Works with WordPress, Webflow, Squarespace, or plain HTML files. No JavaScript build required.
Need server-side control over auth and caching?
Route all widget API calls through your backend. Full control over authentication, response caching, and data transformation.
A side-by-side comparison to help you pick the right approach.
| Feature | Widget SDK | Iframe Embed | Server Proxy |
|---|---|---|---|
| Setup complexity | Low - single script tag or npm install | Low - paste an iframe tag | Medium - requires backend code |
| Framework support | React, Vue, Angular, Svelte, plain HTML | Any - works in static HTML, CMS, no-code tools | Any - your server renders the page |
| Security model | Attribute auth via data-* or token auth via auth-url | Attribute auth via URL params or token auth via postMessage | Full server-side token auth |
| Customization | CSS custom properties, Shadow DOM isolation | Theme and locale via URL parameters | Full control - transform data before rendering |
| Bundle size impact | ~15 KB gzipped (SDK script) | Zero - nothing added to your bundle | Zero client-side - all on your server |
| Auth handling | Attribute auth or token auth via auth-url | Attribute auth via URL params or token auth via postMessage | Token auth only (server-managed) |
| Best for | SPAs, modern web apps, framework-heavy projects | CMS pages, static sites, WordPress, quick prototypes | Regulated environments, SSR, advanced caching needs |
Not sure which to pick?
Start with the Widget SDK overview. You can always switch to iframe or server proxy later - the widget content is the same regardless of integration method.