Skip to main content
The Orwel SDK is a lightweight, powerful library for tracking human behavior, identifying visitors, and monitoring application performance. Drop one script into any site or app — it captures events automatically and powers the Personality Engine, feature adoption, and conversions, all flowing to a single workspace.

Installation

npm install orwel
<script src="https://cdn.jsdelivr.net/npm/orwel@1/dist/orwel.umd.js"></script>

Initialization

Initialize the SDK once, at the root of your application (e.g. App.tsx, main.js), before any tracking call.
import orwel from 'orwel';

orwel.init({
  apiKey: 'orwel_pk_...',    // your public ingest key (from env)
  autoMonitor: true,         // performance, JS errors, web-vitals
  autoEventDetection: true,  // auto page_view / click / scroll
});
The SDK key is an ingest-only public key — safe in the browser bundle, but read it from an environment variable so you can rotate it per environment. See the AI Skill for the right variable name per framework.

What you can do

Event Tracking

Automatic capture, custom events, and the semantic catalog.

Feature Tracking

Map events to features and measure adoption.

Conversions

Capture leads and goals, attributed across sessions.

CDN & Infrastructure

How the SDK is distributed and how events reach the server.

SDK Reference

Every method and init option.

Core methods

Identify

Associate a visitor with traits. Call when a user logs in or updates their profile.
orwel.identify({ email: 'user@example.com', name: 'Jane Doe', plan: 'premium' });

Track

Record a custom event for any user action.
orwel.track('feature_used', { feature_name: 'dark_mode', source: 'settings_panel' });

Conversion

Record a high-value outcome — enriched into a lead. conversion() is async: it waits for the visitor id to resolve, then returns the server-acknowledged result.
const { success } = await orwel.conversion('purchase', { amount: 99.0, currency: 'USD' });

Session

Update session properties.
orwel.session({ cart_value: 150.0, current_step: 'checkout' });