AnalyticsOptions class

Analytics telemetry emitted as OpenTelemetry spans. Mirrors Android ObservabilityOptions.Analytics.

taps and views map to the native analytics.taps / analytics.screenViews publish gates on both iOS and Android. trackEvents gates the track span emitted by the cross-platform Dart pipeline (web and mobile) as well as the native Android span.

Constructors

AnalyticsOptions({bool taps = true, bool views = true, bool trackEvents = true, bool appLifecycle = true, bool appLaunch = true, LDClickTargetResolver? customClickTargetResolver})
Creates analytics options; all analytics telemetry is on by default.
const

Properties

appLaunch → bool
Whether to emit an app_launch span (carrying event.launch_type — install / update / relaunch — and version fields) once per process launch. Mobile-only (iOS, Android); a no-op elsewhere. Defaults to true.
final
appLifecycle → bool
Whether to emit app-lifecycle spans as the app changes state.
final
customClickTargetResolver → LDClickTargetResolver?
Recognizes the application's own widget types as click targets, so a design-system PrimaryButton reports itself instead of the anonymous InkWell it is built from.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
taps → bool
Whether to capture taps and publish a click event for each.
final
trackEvents → bool
Whether to emit a track span when a custom event is tracked, either through the LaunchDarkly client's afterTrack hook or the manual LDObserve.track API. Defaults to true.
final
views → bool
Whether to emit spans for screen/page views. Screen views are reported from Dart (see LDNavigatorObserver); on web this gates the Dart screen_view span, and on Android and iOS it maps to the native analytics.screenViews gate. It gates the span only — the mobile Session Replay Navigate event is emitted regardless. Defaults to true.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

disabled → const AnalyticsOptions
All analytics telemetry disabled. Convenience mirroring Swift's Analytics.disabled.
enabled → const AnalyticsOptions
All analytics telemetry enabled. Convenience mirroring Swift's Analytics.enabled; equivalent to const AnalyticsOptions().