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
type | default value | |||
---|---|---|---|---|
inherited | required | applicationId | string | |
inherited | optional | trackerId | string | Same value as applicationId |
inherited | optional | queue | TrackerQueue | The result of makeBrowserTrackerDefaultQueue |
inherited | optional | transport | TrackerTransport | The result of makeBrowserTrackerDefaultTransport |
inherited | optional | plugins | TrackerPlugins | TrackerPlugins initiated with the result of makeBrowserTrackerDefaultPluginsList |
inherited | optional | active | boolean | true |
inherited | optional | anonymous | boolean | false |
own | optional | endpoint | string | |
own | optional | trackApplicationLoadedEvent | boolean | true |
inherited | optional | trackApplicationContext | boolean | true |
own | optional | trackHttpContext | boolean | true |
own | optional | trackPathContextFromURL | boolean | true |
own | optional | trackRootLocationContextFromURL | boolean | true |
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.