Skip to content

trackkit / dispatcher/types / DispatcherOptions

Interface: DispatcherOptions

Defined in: dispatcher/types.ts:393

Configuration for the low-level network dispatcher.

This container controls how provider HTTP requests are sent, grouped, retried and measured. It wraps several option groups:

  • transport: choose the low-level transport strategy.
  • batching: control how events are grouped into batches.
  • resilience: retries, ad-block handling and proxy settings.
  • connection: reachability and offline monitoring.
  • performance: sampling and timing metrics.

Most applications only set a small subset of these; everything else falls back to sensible defaults.

Properties

transportMode?

optional transportMode: TransportMode

Defined in: dispatcher/types.ts:401

Low-level strategy to use for sending events.

Defaults to 'smart', which adapts to ad-blockers and your resilience configuration. See TransportMode for full semantics.


defaultHeaders?

optional defaultHeaders: Record<string, undefined | string>

Defined in: dispatcher/types.ts:407

Default HTTP headers applied to every outgoing request before provider-specific headers.


batching?

optional batching: BatchingOptions

Defined in: dispatcher/types.ts:414

Event batching configuration to optimise network usage.

See BatchingOptions for available knobs.


connection?

optional connection: ConnectionOptions

Defined in: dispatcher/types.ts:421

Network connection monitoring and offline handling.

See ConnectionOptions for details.


performance?

optional performance: PerformanceOptions

Defined in: dispatcher/types.ts:428

Performance monitoring and sampling configuration.

See PerformanceOptions.


resilience?

optional resilience: ResilienceOptions

Defined in: dispatcher/types.ts:435

Network resilience and error recovery configuration.

See ResilienceOptions.

Released under the MIT License.