This is a sample project that demonstrates how to integrate LiveSession with a React application built with Vite and TypeScript.
- LiveSession account, you can create one here.
VITE_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/react
npm iStart the development server:
npm run devOpen your browser and navigate to http://localhost:5173.
-
LiveSession Browser SDK usage with autocapture events.
-
Basic example how to init LiveSession script in the
src/main.tsxfile. -
Basic example how to use custom events in the
src/App.tsxfile (theCounterevent name).