IRumController
append: (key: string, data: TrackingData, immediately?: boolean) => void;
calculateRelative: (timer: number) => number;
getBeaconIndex: () => number;
getCurrentRumImpression: () => RumImpression;
getHardNavigation: () => RumImpression;
getImpressionById: (id: string) => RumImpression;
getPreviousRumImpression: () => RumImpression;
getSelector: (el: HTMLElement) => string;
getTrackedData: () => TrackingObject;
initRumImpression: (
baseDimensions: BaseDimensions,
userData: UserData,
shouldTrackPI: boolean,
) => void;
onBFCacheNavigation: SimpleTriggerFunction<TrackingData>;
onClick: SimpleTriggerFunction<TrackingData>;
onDataLayer: SimpleTriggerFunction<TrackingData>;
onDataLayerReady: SimpleTriggerFunction<TrackingData>;
onDfDataReady: SimpleTriggerFunction<TrackingData>;
onDOMInteractive: SimpleTriggerFunction<TrackingData>;
onGaReady: SimpleTriggerFunction<TrackingData>;
onGaTracking: SimpleTriggerFunction<TrackingData>;
onLeavePage: SimpleTriggerFunction<TrackingData>;
onLoad: SimpleTriggerFunction<TrackingData>;
onNextTick: SimpleTriggerFunction<TrackingData>;
onPiTimeout: SimpleTriggerFunction<TrackingData>;
onScrollEnd: SimpleTriggerFunction<TrackingData>;
onSpeedKitLoaded: SimpleTriggerFunction<TrackingData>;
onVisibilityHidden: SimpleTriggerFunction<TrackingData>;
set: (
key: string,
data: TrackingData,
immediately?: boolean,
mode?: boolean | SendMode,
) => boolean;
setTiming: (
key: string,
data: TrackingData,
immediately?: boolean,
mode?: boolean | SendMode,
) => boolean;
trackCustomEvent: (
action: string,
label: string,
value: number,
immediately?: boolean,
withTimestamp?: boolean,
) => void;
trackCustomTimer: (
key: string,
data: TrackingData,
immediately?: boolean,
) => void;
triggerSoftNavigation: (
url: string,
timestamp?: number,
softResourcesDuration?: number,
softRenderDuration?: number,
) => void;
}
Hierarchy (View Summary)
- TrackingInstance
- IRumController
Index
Properties
Properties
append
Appends the given data to the given key for tracking. This method can be called multiple times to add multiple data items to the key.
calculate Relative
Calculates a given timer relative to the navigation start.
get Beacon Index
Returns the current beacon index or 0 if no beacon has been sent yet.
get Current Rum Impression
Returns the pointer to the current page impression.
get Hard Navigation
Returns the pointer to hard navigation page impression.
get Impression By Id
Returns the pointer to the page impression of the given pi id.
get Previous Rum Impression
Returns the pointer to the previous page impression.
get Selector
Returns an accurate selector for an element in the DOM.
get Tracked Data
Public method to get the current tracked RUM data
init Rum Impression
baseDimensions: BaseDimensions,
userData: UserData,
shouldTrackPI: boolean,
) => void
Initializes a new page impression after soft navigation.
on BF Cache Navigation
Ensures the callback is executed after bfCache.
on Click
Ensures the callback is executed after a click event.
The callback function will be called with ClickTriggerEvent and ClickTriggerTarget as parameter.
on Data Layer
Ensures the callback is executed when there is a new data layer event.
The callback function will be called with the data layer event as parameter.
on Data Layer Ready
This method can be used to subscribe to any new populated dataLayer on the window object.
Note that subscribed observers can be notified multiple times on the same page, when the dataLayer is overwritten by a new one. The callback function will be called with the current dataLayer instance as parameter.
on Df Data Ready
Ensures the callback is executed after the dynamic fetcher has relevant data.
on DOM Interactive
Ensures the callback is executed after the DOMContentLoaded event.
on Ga Ready
Ensures the callback is executed when the GA is ready.
on Ga Tracking
Ensures the callback is executed when the GA tracks an event.
The callback function will be called with the data layer event as parameter.
on Leave Page
Ensures the callback is executed when the user leaves the page.
on Load
Ensures the callback is executed when the document is completed.
on Next Tick
Ensures the callback is executed in next JS-Tick (end of actual event queue).
on Pi Timeout
Ensures the callback is executed on pi timeout, 29 min after the first beacon.
on Scroll End
Ensures the callback is executed when the user scrolls and stops scrolling for 150ms.
on Speed Kit Loaded
Ensures the callback is executed after the dynamic fetcher is done.
on Visibility Hidden
Ensures the callback is executed after the visibility state changes to hidden.
set
key: string,
data: TrackingData,
immediately?: boolean,
mode?: boolean | SendMode,
) => boolean
Sets the given data to the given key for tracking. Calling this method multiple times will override old value. To track multiple values per key use append
Type Declaration
- (
key: string,
data: TrackingData,
immediately?: boolean,
mode?: boolean | SendMode,
): boolean Parameters
key: string
data: TrackingData
Optional
immediately: booleanOptional
mode: boolean | SendMode
Returns boolean
true
if value is scheduled to be sent with the next beacons,false
otherwise.
- (
set Timing
key: string,
data: TrackingData,
immediately?: boolean,
mode?: boolean | SendMode,
) => boolean
Sets the given data to the given key for tracking relatively to the navigationStart when it is numeric. Otherwise it will be tracked normal. Calling this method multiple times will override old value. To track multiple values (without being calculated relatively) per key use append.
Type Declaration
- (
key: string,
data: TrackingData,
immediately?: boolean,
mode?: boolean | SendMode,
): boolean Parameters
key: string
data: TrackingData
Optional
immediately: booleanOptional
mode: boolean | SendMode
Returns boolean
true
if value is scheduled to be sent with the next beacons,false
otherwise.
- (
track Custom Event
action: string,
label: string,
value: number,
immediately?: boolean,
withTimestamp?: boolean,
) => void
Send custom event information (action, label and value) using a beacon.
track Custom Timer
key: string,
data: TrackingData,
immediately?: boolean,
) => void
Sends custom timer information (key and data) using a beacon.
trigger Soft Navigation
url: string,
timestamp?: number,
softResourcesDuration?: number,
softRenderDuration?: number,
) => void
Soft navigations can trigger this function to execute callbacks associated to page lifecycle.
Controlling entity for all tracking data collection and sending.