TrackingInstance
append: (key: string, data: TrackingData, immediately?: boolean) => void;
calculateRelative: (timer: number) => number;
getBeaconIndex: () => number;
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;
}
Hierarchy (View Summary)
- TrackingInstance
Index
Properties
Properties
append
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.
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.
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.