Experience SDK
A lightweight, explainable, plugin-based client-side experience runtime built on @lytics/sdk-kit (opens in a new tab).
🎉 v0.1.0 Released!
Experience SDK is now available on npm with multiple button variants, frequency capping, and responsive layout. Only 6.9 KB gzipped.
Multiple buttons with variants (primary, secondary, link) • Responsive layout (desktop inline, mobile stack) • Frequency capping per session/day/week • Complete TypeScript support • Only 6.9 KB gzipped
npm install @prosdevlab/experience-sdkKey Features
- Explainability-First - Every decision returns structured reasons
- Plugin-Based - Extensible architecture using sdk-kit patterns
- Script Tag Ready - Works without build tools (IIFE bundle)
- Type-Safe - Full TypeScript support
- Developer-Focused - Built for debugging and inspection
Quick Start
npm install @prosdevlab/experience-sdkimport { createInstance } from '@prosdevlab/experience-sdk';
const experiences = createInstance({ debug: true });
experiences.register('welcome-banner', {
type: 'banner',
targeting: { url: { contains: '/' } },
content: { title: 'Welcome!', message: 'Thanks for visiting' }
});
const decision = experiences.evaluate();
console.log(decision.reasons); // ['URL matches', 'Frequency cap not reached']What Makes It Different
Every decision includes human-readable reasons explaining why an experience was shown or hidden:
{
"show": true,
"experienceId": "welcome-banner",
"reasons": [
"URL matches '/'",
"Frequency cap not reached (1/3 this session)",
"User targeting passed"
],
"trace": [...],
"metadata": {...}
}Next Steps
- Getting Started - Installation and setup
- Interactive Demo - Try it in your browser
- API Reference - Complete API documentation