Installation
Install the SDK via npm or yarn:Initialization
Initialize the SDK at the root of your application (e.g.,App.tsx, main.js).
Core Methods
Identify
Associate a visitor with a unique ID and traits. Call this when a user logs in or updates their profile.Track
Track custom events to measure specific user actions.Conversion
Track high-value conversion events.Session
Update session properties or mark a session as active.Form Tracking
Manually track complex forms (though auto-tracking handles most cases).Auto-Tracking
WhenautoMonitor is enabled, Orwel automatically detects and tracks the following events without any additional code.
Navigation & Interaction
page_view: Page loads and route changes.click: Clicks on interactive elements.scroll: Scroll depth milestones.hover: Meaningful hovers over elements.search: Search queries performed.form_abandon: Forms started but not submitted.
Technical & Performance
js_error: JavaScript runtime errors.network_request_failed: Failed API calls.file_download: Downloads of PDF, ZIP, etc.timing_complete: Performance milestones.
Engagement
video_play,video_progress,video_complete: HTML5 video interactions.select_content: Text selection or content interaction.share: Usage of native share APIs.
Ecommerce (Auto-detected from DOM structures)
add_to_cartbegin_checkoutpurchase