This is a sample project that demonstrates how to integrate LiveSession with a Next.js application.
- LiveSession account, you can create one here.
NEXT_PUBLIC_LIVESESSION_TRACK_IDenvironment variable - you can add it to the.envfile. Tracking ID can be found in the LiveSession -> Settings -> Websites.
Clone this repository and install the dependencies:
git clone https://github.com/livesession/livesession-browser-samples
cd livesession-browser-samples/next
npm iStart the development server:
npm run devOpen your browser and navigate to http://localhost:3000.
-
LiveSession Browser SDK usage with autocapture events.
-
Basic example how to init LiveSession script in the
src/app/livesession.tsxfile. -
Basic example how to use custom events in the
src/app/components/Counter.tsxfile (theCounterevent name).