Skip to content

trackkit / index / ResolvedFacadeOptions

Interface: ResolvedFacadeOptions

Defined in: types.ts:382

Internal

Fully-resolved facade configuration with defaults applied.

This is the internal shape used after configuration merging.

Extends

  • Required<Omit<FacadeOptions, "consent" | "navigationSource" | "urlResolver" | "urlTransform">>

Properties

allowWhenHidden

allowWhenHidden: boolean

Defined in: types.ts:255

Whether to allow tracking when the document is hidden.

When false, events may be skipped while the tab is backgrounded to avoid noisy data.

Inherited from

FacadeOptions.allowWhenHidden


autoTrack

autoTrack: boolean

Defined in: types.ts:263

Automatically track page views.

When true, navigation events detected by the facade will emit pageview() calls without you needing to call them manually.

Inherited from

FacadeOptions.autoTrack


bustCache

bustCache: boolean

Defined in: types.ts:271

Enable cache-busting for provider HTTP requests.

When true, Trackkit adds query params / headers to avoid accidental caching of analytics requests.

Inherited from

FacadeOptions.bustCache


debug

debug: boolean

Defined in: types.ts:279

Enable debug logging to the console.

When true, the facade and dispatcher emit verbose logs under a Trackkit-specific logger namespace.

Inherited from

FacadeOptions.debug


domains

domains: string[]

Defined in: types.ts:287

Whitelist of domains to track.

If set, only events whose hostname matches one of these entries will be sent.

Inherited from

FacadeOptions.domains


doNotTrack

doNotTrack: boolean

Defined in: types.ts:295

Honour the browser’s “Do Not Track” setting.

When true and DNT is enabled, non-essential events will be blocked by policy.

Inherited from

FacadeOptions.doNotTrack


exclude

exclude: string[]

Defined in: types.ts:303

Exclude paths from tracking.

Typically used for admin routes or internal tools. Matching happens against the resolved URL; see the docs for matching semantics.

Inherited from

FacadeOptions.exclude


includeHash

includeHash: boolean

Defined in: types.ts:310

Include the URL hash fragment when computing the reporting URL.

Useful for hash-based SPAs that encode route state in #....

Inherited from

FacadeOptions.includeHash


queueSize

queueSize: number

Defined in: types.ts:317

Maximum number of events to hold in the in-memory queue.

When this limit is exceeded, oldest events are dropped first.

Inherited from

FacadeOptions.queueSize


trackLocalhost

trackLocalhost: boolean

Defined in: types.ts:322

Whether to track events on localhost and similar development hosts.

Inherited from

FacadeOptions.trackLocalhost


onError()

onError: (error) => void

Defined in: types.ts:351

Custom error handler for analytics errors.

Defaults to a console-based handler. You can integrate this with your own error reporting (Sentry, etc).

Parameters

error

AnalyticsError

Returns

void

Inherited from

FacadeOptions.onError


consent: ResolvedConsentOptions

Defined in: types.ts:389


navigationSource: ResolvedNavigationSource

Defined in: types.ts:390


urlResolver()?

optional urlResolver: () => string

Defined in: types.ts:391

Returns

string


urlTransform()?

optional urlTransform: (url) => string

Defined in: types.ts:392

Parameters

url

string

Returns

string

Released under the MIT License.