Web integration
React and Next.js Session Replay and Error Tracking
LoggerAI records each visit to a React, Next.js or Vite app as a session of pages, clicks, requests and errors, and groups the errors by cause.
What LoggerAI records
- Pages, clicks, requests and errors, as a session
- Errors grouped by cause on the Errors page
- Route changes, automatically in Next.js
- Trace headers on your own API calls, so a session links to the server request behind it
Any web app. Passwords, tokens, card numbers and locations are masked before anything leaves the browser, and what people type is never recorded.
How to set it up
1. Install the package
npm install @loggerai/browser2. Add your public key
Use the project's public key (pk_...). Never put the secret key in a browser app.
NEXT_PUBLIC_LOGGERAI_KEY=pk_live_...3. Add it to the root layout
It works in Server Component layouts and in _app.tsx.
// app/layout.tsx import { LoggerAI } from "@loggerai/browser/next" <LoggerAI traceHosts={["api.example.com"]} />
See every integration, or what you can do with the data in features.
Questions
- Does session replay record passwords?
- No. It never records what people type, and passwords, tokens, card numbers and locations are masked in URLs and data before anything leaves the browser.
- Can I use it without Next.js?
- Yes. React apps on Vite, Create React App or Remix use the LoggerAIProvider component from @loggerai/browser/react.
Try it on your own app
The Free plan is free for good, and needs no card.