BrowserTrackerConfig

Object used to construct BrowserTracker instances.

BrowserTrackerConfig extends the Core TrackerConfig.

type BrowserTrackerConfig = TrackerConfig & {
endpoint?: string;
trackApplicationLoadedEvent?: boolean;
};

The resulting complete definition is:

type BrowserTrackerConfig = {
applicationId: string;
trackerId?: string;
queue?: TrackerQueueInterface;
transport?: TrackerTransportInterface;
plugins?: TrackerPlugins;
active?: boolean;
anonymous?: boolean;
endpoint?: string;
trackApplicationLoadedEvent?: boolean;
trackApplicationContext?: boolean;
trackHttpContext?: boolean;
trackPathContextFromURL?: boolean;
trackRootLocationContextFromURL?: boolean;
};
info

Browser Tracker can be configured in an easier way, as opposed to the Core Tracker, by specifying just an endpoint.
Internally it will automatically configure the Transport layer for the given endpoint with sensible defaults.

Attributes

typedefault value
inheritedrequiredapplicationIdstring
inheritedoptionaltrackerIdstringSame value as applicationId
inheritedoptionalqueueTrackerQueueThe result of makeBrowserTrackerDefaultQueue
inheritedoptionaltransportTrackerTransportThe result of makeBrowserTrackerDefaultTransport
inheritedoptionalpluginsTrackerPluginsTrackerPlugins initiated with the result of makeBrowserTrackerDefaultPluginsList
inheritedoptionalactivebooleantrue
inheritedoptionalanonymousbooleanfalse
ownoptionalendpointstring
ownoptionaltrackApplicationLoadedEventbooleantrue
inheritedoptionaltrackApplicationContextbooleantrue
ownoptionaltrackHttpContextbooleantrue
ownoptionaltrackPathContextFromURLbooleantrue
ownoptionaltrackRootLocationContextFromURLbooleantrue
caution

endpoint and transport are mutually exclusive. While both optional, either one must be specified.

When providing only endpoint, the Tracker will automatically create a Transport configuration initialized with it.