@incognoir/browser-sdk
v1.0.0
Published
Incognoir Browser SDK — Real-time behavioral telemetry for threat detection and intent analysis.
Maintainers
Readme
@incognoir/browser-sdk
Real-time behavioral telemetry SDK for threat detection and intent analysis.
Installation
npm install @incognoir/browser-sdkQuick Start
import { init, setUserId } from '@incognoir/browser-sdk';
// Initialize with your environment credentials
init({
apiBase: 'https://api.incognoir.com', // Your Incognoir API endpoint
apiKey: 'your-scoped-api-key', // From your Admin Console
environmentId: 'production', // Your environment ID
});
// Optionally identify the logged-in user
setUserId('[email protected]');That's it. The SDK will automatically:
- Capture mouse movement patterns, typing rhythm, scroll velocity, and click precision
- Send behavioral telemetry to the inference engine every 4 seconds
- Generate unique device IDs and session IDs for tracking
API Reference
init(options)
Initialize the SDK. Must be called before any other function.
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| apiBase | string | required | Backend API URL |
| apiKey | string | '' | Scoped API key |
| environmentId | string | 'default' | Environment identifier |
| debug | boolean | false | Enable console logging |
| intervalMs | number | 4000 | Auto-send interval (ms) |
setUserId(userId)
Associate a user identity with the current session.
sendTelemetry(options?)
Manually trigger a telemetry event (auto-triggered by init() on an interval).
destroy()
Stop collecting signals and remove all event listeners.
What Data Is Collected
The SDK captures behavioral micro-features — not content:
| Signal | Description |
|--------|-------------|
| typing_speed | Keystrokes per second |
| scroll_speed | Scroll velocity (px/s) |
| cursor_speed | Mouse movement speed (px/s) |
| dwell_time | Time since last interaction |
| click_count | Number of clicks in window |
No keystrokes, form data, or personal content is captured.
License
MIT © Incognoir Security
