Browser Telemetry
Browser telemetry is opt-in. If your Angular app never calls provideNgafTelemetry(), the service has no enabled config and capture() returns without sending.
#Configure
The endpoint receives:
The browser distinct ID is generated per service instance. The source does not write it to storage.
#Prefer a sink for app-owned analytics
Use sink when your app already has an analytics boundary.
When sink is present, the service does not use endpoint or PostHog.
#Sampling
sampleRate is normalized:
- missing, invalid, or non-finite values become
1; - values less than or equal to
0disable capture; - values greater than or equal to
1capture every event; - values between
0and1useMath.random().
Captured events include sample_weight. When the sample rate is 0.25, the default weight is 4.
#Events captured by the service
The service exposes convenience methods:
captureStreamErrored() sends errorClass, not the raw error object.
#Delivery failures
Browser capture is wrapped in a try/catch. A sink error, fetch failure, or dynamic import failure is swallowed.
That keeps telemetry from becoming part of your application control flow.