Skip to main content

Installation

Quick start

Initialize Outlit using an APP_INITIALIZER:
Configure your environment:
For production, create 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:
Register the interceptor:

Activation event

Track your value milestone as an ordinary event once it succeeds:
Choose this event as your activation event in Outlit. The first matching event records activation once for each eligible resolved person and company, independently. Billing status comes from verified integrations such as Stripe. See Customer journey. The default autoTrack: "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:
Initialize without auto-tracking:

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