Installation
Quick start
Initialize Outlit in your root layout:.env:
Alternative: layout component
Initialize in the layout component:Tracking events
Track events in your components:Identifying users
Identify users after authentication:Navigation tracking
Track navigation with SvelteKit’s stores:Load function integration
Track events from load functions:Server-side tracking
Track events from API routes:Auth integration
With Lucia
Activation event
Track your value milestone as an ordinary event once it succeeds:Consent management
The defaultautoTrack: "auto" mode already keeps tracking off for visitors in regions that require opt-in consent (EEA, UK, Switzerland, or unknown); the example below uses autoTrack: false to wait for an explicit consent signal unless a previous opt-in is stored.
Handle user consent:
Stores integration
Create a store for Outlit:Environment variables
Configure environment variables:TypeScript support
Full TypeScript support is included:Next steps
Server-side tracking
Track events from your backend
Identity resolution
Learn how visits and events link to people
npm package
Full API reference
React integration
Use Outlit with React
