Configuration

Pass an options object to either provider to customise behaviour.

tsx
<NohmoNextProvider
projectId="..."
apiKey="..."
options={{
flushInterval: 5000, // ms between batch flushes (default 3000)
debug: true, // log events to the console
autoPageView: 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)
}}
>
OptionTypeDefaultDescription
flushIntervalnumber3000Milliseconds between event batch flushes
debugbooleanfalseLog all events and state to the browser console
autoPageViewbooleantrueSend PAGE_VIEW on every route change (Next.js only)
autoScrollDepthbooleantrueTrack scroll depth at 25 / 50 / 75 / 100%
autoTimeSpentbooleantrueSend TIME_SPENT with seconds when leaving a page
autoCapturebooleantrueCapture click events automatically