DocumentationConfiguration

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 a PAGE_VIEW when the SDK initialises. Route changes are tracked by NohmoProvider in Next.js and by usePageView() elsewhere
autoScrollDepthbooleantrueTrack scroll depth at 25 / 50 / 75 / 100%
autoTimeSpentbooleantrueSend TIME_SPENT with seconds when leaving a page
autoCapturebooleantrueCapture click events automatically
autoErrorsbooleantrueCapture uncaught exceptions, unhandled rejections and failed fetch/XHR requests
releasestring''Build/version string, so errors and metrics can be attributed to a deploy
attributionParamsstring[]['ref']Extra query params treated as campaign sources alongside UTM