Configuration
Pass an options object to either provider to customise behaviour.
tsx
<NohmoNextProviderprojectId="..."apiKey="..."options={{flushInterval: 5000, // ms between batch flushes (default 3000)debug: true, // log events to the consoleautoPageView: true, // send PAGE_VIEW on route change (default true)autoScrollDepth: true, // track scroll milestones (default true)autoTimeSpent: true, // track time on page (default true)autoCapture: true, // capture clicks automatically (default true)}}>
| Option | Type | Default | Description |
|---|---|---|---|
| flushInterval | number | 3000 | Milliseconds between event batch flushes |
| debug | boolean | false | Log all events and state to the browser console |
| autoPageView | boolean | true | Send PAGE_VIEW on every route change (Next.js only) |
| autoScrollDepth | boolean | true | Track scroll depth at 25 / 50 / 75 / 100% |
| autoTimeSpent | boolean | true | Send TIME_SPENT with seconds when leaving a page |
| autoCapture | boolean | true | Capture click events automatically |