Installation
Exports
Configuration
Pages
track()
Start a tracked session.
Session
Session object methods and properties.
Events
All signal and lifecycle events.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
@onlook/core — the attention tracking SDK.
npm install @onlook/core
| Export | Description |
|---|---|
track(userId, config?) | Start a session and return a Session object |
Session | Class with .on(), .stop(), .score |
OnlookConfig | TypeScript type for configuration |
AttentionEvent | TypeScript type for signal events |
interface OnlookConfig {
context?: string // Label for this surface (default: window.location.pathname)
threshold?: number // Intervention trigger score (default: 40)
ingestUrl?: string // Custom ingest endpoint for self-hosting
interventionCooldown?: number // Seconds between interventions (default: 60)
signals?: {
face?: boolean // Enable face detection (default: false)
idle?: number // Idle timeout in seconds (default: 30)
}
}