This is a sample project that demonstrates how to integrate LiveSession with a SvelteKit application.
- LiveSession account, you can create one here.
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/sveltekit
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/routes/+layout.tsfile. -
Basic example how to use custom events in the
src/routes/+page.sveltefile (theCounterevent name).