Documentation Index Fetch the complete documentation index at: https://docs.tracelit.io/llms.txt
Use this file to discover all available pages before exploring further.
npm install @tracelit/tracker
Call init() in ngOnInit of your root AppComponent:
// src/app/app.component.ts
import { Component , OnInit } from '@angular/core'
import { init } from '@tracelit/tracker'
@ Component ({
selector: 'app-root' ,
templateUrl: './app.component.html'
})
export class AppComponent implements OnInit {
ngOnInit () {
init ({ token: 'YOUR_TOKEN_HERE' })
}
}
Tracelit detects Angular Router navigation automatically via history.pushState — no router hooks needed.
Adding user identity
Inject your auth service and call identify() once the user is resolved:
// src/app/app.component.ts
import { Component , OnInit } from '@angular/core'
import { init , identify , reset } from '@tracelit/tracker'
import { AuthService } from './auth.service'
@ Component ({
selector: 'app-root' ,
templateUrl: './app.component.html'
})
export class AppComponent implements OnInit {
constructor ( private auth : AuthService ) {}
ngOnInit () {
init ({ token: 'YOUR_TOKEN_HERE' })
this . auth . user$ . subscribe ( user => {
if ( user ) identify ( user . id , { email: user . email , plan: user . plan })
else reset ()
})
}
}
Install with AI (Bolt, Lovable, Replit)
Install Tracelit in my Angular project.
Initialize @tracelit/tracker in AppComponent ngOnInit with:
init({ token: 'YOUR_TOKEN_HERE' })
Make minimal edits, show changed files, and provide a short verification checklist.
What’s next?
Identify users Full guide to linking sessions to real users.
Feature tagging Tag flows in session replays.