Installation
Quick Start
Add Outlit to your base layout:Alternative: Inline Script
Use an inline script for better performance:Tracking Events
Track events in Astro components:With Client Directives
Use client directives for interactive components:Framework Islands
React Island
Vue Island
Svelte Island
Identifying Users
Identify users after authentication:Auth State Management
For apps with authentication, usesetUser() and clearUser() to sync user identity:
Using
setUser() ensures the user identity persists across page navigations and is properly set when users return to your site already logged in.View Transitions
Track navigation with Astro’s View Transitions:API Routes
Track events from API endpoints:For server-side tracking, see the Node.js integration guide.
SSR Pages
For SSR pages, ensure tracking runs client-side:Content Collections
Track interactions with content:Activation event
Track activation after the user completes your product milestone:Configure this ordinary event as your activation signal. Outlit Core derives activation, engagement, and inactivity; billing comes from verified integrations such as Stripe. See Customer Journey.
Consent Management
Handle user consent: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 profiles are merged
NPM Package
Full API reference
React Integration
Use Outlit with React