@gurulu/web
v1.2.2
Published
Gurulu browser SDK. Autocapture + identity hooks + registry-bound contract runtime + web-vitals. 1-line install.
Readme
@gurulu/web
Browser SDK for Gurulu — Truth Layer for product analytics.
Zero runtime dependencies. ~8 KB gzipped.
Install
Script tag (autocapture, no build step)
<script
src="https://cdn.gurulu.io/t.js"
data-workspace="pk_xxxxxxxxxxxx"
defer
></script>NPM
npm install @gurulu/web
# or
bun add @gurulu/webimport { createGurulu } from '@gurulu/web';
const gurulu = createGurulu();
gurulu.init({ workspace: 'pk_xxxxxxxxxxxx' });
gurulu.identify('user_42', { plan: 'pro' });
gurulu.track('checkout.completed', { order_id: 'o_123', total: 49.99 });Features
- Autocapture — click, pageview, form submit, scroll depth, web-vitals (LCP, INP, CLS).
- Identity —
identify(personId, traits)with deterministic + probabilistic merge on the server. - Contract runtime — registry-bound event validation: malformed events are quarantined, never silently dropped.
- Consent-aware — respects Google Consent Mode v2, GDPR/CCPA gates.
Documentation
Full API reference and integration guides: gurulu.io/docs
License
MIT — see LICENSE.
Copyright © 2026 MONAFY LTD (UK Company No. 17031485).
