@lunardinos/recorder-next
v0.1.2
Published
[Lunar Dinos](https://lunardinos.com) session recording SDK for [Next.js](https://nextjs.org) apps.
Downloads
263
Readme
@lunardinos/recorder-next
Lunar Dinos session recording SDK for Next.js apps.
Captures session replays, page navigations, clicks, inputs, and errors — with zero configuration beyond wrapping your app.
Installation
npm install @lunardinos/recorder-nextSetup
Wrap your app with RecorderProvider in your root layout:
// app/layout.tsx
import { RecorderProvider } from "@lunardinos/recorder-next"
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html>
<body>
<RecorderProvider apiKey="your-api-key">
{children}
</RecorderProvider>
</body>
</html>
)
}Route changes are tracked automatically via Next.js navigation hooks.
Identifying users
"use client"
import { useRecorder } from "@lunardinos/recorder-next"
function Dashboard() {
const { identify } = useRecorder()
useEffect(() => {
identify({
user: { id: "user-123", email: "[email protected]" },
account: { id: "acme", name: "Acme Inc" },
})
}, [])
return <div>...</div>
}Props
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| apiKey | string | required | Your Lunar Dinos API key |
| endpoint | string | https://ingest.lunardinos.com | Custom ingestion endpoint |
Learn more
Visit lunardinos.com to get started.
