API Reference
Error Monitoring
Getting Started
Welcome to Highlight
Integrations
Product Features
Session Replay
Tips
Menu

Next.js

👋 Welcome!

Let's get you up and running with Highlight. We should be done in less than 2 minutes.

Installing the SDK

Install highlight.run and @highlight-run/react using your package manager.

# with npm npm install highlight.run @highlight-run/react # with yarn yarn add highlight.run @highlight-run/react
Copy
Initialize

Initialize Highlight where your application starts.

import { H } from 'highlight.run' H.init( '<YOUR_PROJECT_ID>', // Get your project ID from https://app.highlight.run/setup )
Copy
Example
import type { AppProps } from 'next/app' import { H } from 'highlight.run' import { ErrorBoundary } from '@highlight-run/react' H.init('<YOUR_PROJECT_ID>') // Get your project ID from https://app.highlight.run/setup function MyApp({ Component, pageProps }: AppProps) { return ( <ErrorBoundary> <Component {...pageProps} /> </ErrorBoundary> ) } export default MyApp
Copy
Verify

Start your app, go to it in the browser, then click around. Highlight will be recording your session and it will show up on https://app.highlight.run/sessions a few seconds after recording has started.