Skip to main content

Installation

Quick Start

Initialize Outlit in your root layout:
Add your public key to .env:

Alternative: Layout Component

Initialize in the layout component:

Tracking Events

Track events in your components:

Identifying Users

Identify users after authentication:
Track navigation with SvelteKit’s stores:

Load Function Integration

Track events from load functions:

Server-Side Tracking

Track events from API routes:
For server-side tracking, see the Node.js integration guide.

Auth Integration

With Lucia

Activation event

Track activation after the user completes your product milestone:
Configure first_project_created as your ordinary activation event if it represents the value milestone. Outlit Core derives lifecycle stages; billing comes from verified integrations such as Stripe. See Customer Journey.
Handle user consent:
Initialize without auto-tracking:

Stores Integration

Create a store for Outlit:
Use in components:

Environment Variables

Configure environment variables:
Keep server environment variables out of client-side code. Only use OUTLIT_KEY in server-side API routes.

TypeScript Support

Full TypeScript support is included:

Next Steps

Server-Side Tracking

Track events from your backend

Identity Resolution

Learn how profiles are merged

NPM Package

Full API reference

React Integration

Use Outlit with React