Set up HumanBehavior SDK with Next.js applications
HumanBehaviorProvider
accepts these options:
app/layout.tsx
(App Router) or pages/_app.tsx
(Pages Router):
useHumanBehavior
hook to track custom events:
HumanBehaviorProvider
automatically tracks page views for you. It handles:
.env.local
file in your project root:types/global.d.ts
file:
useHumanBehavior
useUserTracking
useRedaction
'use client'
at the top of your file'use client'
directivelogLevel
in the provider options: