Skip to main content

Next.js — Identify

Identify users from client components (using React hooks) or from the server. On the server, pass sessionId and windowId from request headers when you have them so events stay correlated with the client session.

Client: useSignalIdentify

Use the same hook as the React integration, re-exported from @signal-js/nextjs/client:

Server: identify(options)

From API routes or Server Actions, call signal.identify() with an options object. Include sessionId and windowId from the request when you want to tie the identify to the same browser session:

See also