Installation
Quick start
Initialize Outlit using anAPP_INITIALIZER:
environment.prod.ts with your production key.
Creating a service
Create a service for a shorter setup:Tracking events
Inject and use the service in components:Identifying users
Identify users after authentication:Router integration
Track navigation with Angular Router:If you set
trackPageviews: true during init, pageviews are tracked automatically. The above example is only needed for custom pageview logic.Auth guard integration
Track authentication events:RxJS integration
Track with observables:Lifecycle hooks
Track component lifecycle events:Interceptor for API tracking
Track API calls: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); use autoTrack: false to wait for an explicit consent signal unless a previous opt-in is stored.
Handle user consent:
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
