@intunix/core
v0.1.14
Published
Renderer-agnostic core for the [Intunix](https://intunix.com) experience platform — the logic layer behind in-app surveys, NPS, CSAT, and feedback forms.
Readme
@intunix/core
Renderer-agnostic core for the Intunix experience platform — the logic layer behind in-app surveys, NPS, CSAT, and feedback forms.
It contains the IntunixClient (event queue, trigger evaluator, experience
manager, offline persistence, session tracking) and the framework-agnostic
FeedbackRunner + types. You normally consume it through a binding rather than
directly:
- @intunix/web — drop-in
cx.jsfor any site (loader tag). - @intunix/react — React provider + hooks.
- @intunix/vue — Vue 3 provider + composables.
Install
npm install @intunix/coreDirect use
import { IntunixClient } from '@intunix/core';
const client = new IntunixClient({ renderer: myRenderer });
// Register makes a form auto-show when its trigger matches. Do it at init…
await client.init('pk_live_xxx', { register: ['nps_q4'] });
// …or anytime later (returns an unregister fn):
const off = await client.register('exit_survey');
client.identify('u_42', { plan: 'pro' });
client.track('checkout_completed', { value: 99 });
client.showForm('nps_q4'); // or just open one manually, no register neededA Renderer decides how experiences are displayed — see the React/Vue/web
bindings for reference implementations.
How forms show
- Opt-in: a form auto-triggers only after you
registerit (by slug or id). Unregistered forms never pop on their own — butshowForm(slug)still opens any form manually. - One at a time: trigger matches and manual
showFormcalls funnel through one queue, so forms appear in sequence, never stacked. - URL delay: URL-triggered forms wait
urlTriggerDelayMs(default 600) so they don't pop the instant a page loads.
await client.init('pk_live_xxx', { register: ['welcome', 'nps_q4'], urlTriggerDelayMs: 600 });License
Proprietary © Intunix.
