Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

LiveSession + Next.js

This is a sample project that demonstrates how to integrate LiveSession with a Next.js application.

Prerequisites

  1. LiveSession account, you can create one here.
  2. NEXT_PUBLIC_LIVESESSION_TRACK_ID environment variable - you can add it to the .env file. Tracking ID can be found in the LiveSession -> Settings -> Websites.

Getting Started

Clone this repository and install the dependencies:

git clone https://github.com/livesession/livesession-browser-samples

cd livesession-browser-samples/next

npm i

Start the development server:

npm run dev

Open your browser and navigate to http://localhost:3000.

Sample overview

  1. LiveSession Browser SDK usage with autocapture events.

  2. Basic example how to init LiveSession script in the src/app/livesession.tsx file.

  3. Basic example how to use custom events in the src/app/components/Counter.tsx file (the Counter event name).