An event is a single thing a visitor did: a page view, a click, a form submit, a purchase. Orwel captures events two ways: automatically (page views, clicks, scrolls, errors) and explicitly with a one-line call. Every event is tied to a visitor and a session.
The four primitives
typescript
// a named event with any propertiesorwel.track('quote_created', { amount: 1200, currency: 'MXN' });// attach identity + traits to the current visitororwel.identify({ email: 'user@acme.com', plan: 'pro' });// a conversion / lead (its own record, attributed to the visitor)await orwel.conversion('signup', { email, source: 'landing' });// per-session state (current screen, cart value...)orwel.session({ currentScreen: 'checkout', cartTotal: 99.9 });
Automatic capture
With autoEventDetection and autoMonitor enabled at init, the SDK captures common signals with no extra code:
Navigation & interaction
page_view, click, scroll, hover, search, select_content, including SPA route changes.
Technical & performance
js_error, network_request_failed, console errors, plus navigation and resource timings attached to the session.
Elements with a data-orwel-section attribute are also tracked automatically: total visible time, max visibility %, and interaction count are rolled up into session.sectionEngagements (no extra events).
Every track() code must exist in your workspace catalog, otherwise the ingest rejects it with Event not found: <code> (HTTP 400 on a single event, or a partial 207 inside a batch). The catalog has two parts:
The Orwel catalog: a few hundred standard codes (the most common ones are listed below) that every workspace can send.
Your custom codes (deal_created, invoice_stamped): add them as a custom event in a journey or feature in Journeys and features setup. They are registered for your workspace when you save.
Conversion codes are not gated: any valid code works with conversion().
Event codes are lowercase_snake_case, up to 50 characters, letters, numbers and underscores. Keep them verb-based and stable (quote_sent, not QuoteSent2).
Semantic event catalog
Common standard events, by category. The full catalog, with search by domain and vertical, is in the event picker of Journeys and features setup.