Search


Search something to see results

RumPlugin

interface RumPlugin<T extends TrackingData> {
    append?: DefaultTrackFunction<T>;
    key?: string;
    on?:
        | TriggerFunctionAlias
        | SimpleTriggerFunction<T>
        | CustomTriggerFunction<T>;
    set?: DefaultTrackFunction<T>;
    setTiming?: DefaultTrackFunction<number>;
    shouldExecute?: () => boolean;
    track?: CustomTrackFunction;
    type?: CustomDimensionType | TrackingDataType | "SoftNavigation";
}

Type Parameters

  • T extends TrackingData

Index

Properties

Properties

A function which returns a value or a list of values to be tracked immediately. If the function is called multiple times by the TriggerFunction the data will be appended.

Note: define either RumPlugin.set or RumPlugin.append or RumPlugin.setTiming since only one can be used at a time.

key?: string

The key which should be used to report the plugins data. When using RumPlugin.track this is optional, because the key will be set manually when calling the RumController.

Either a known TriggerFunction which is provided by the RumController or a custom function. If no TriggerFunction is provided the given Trackfunction is executed directly.

A function which returns a value or a list of values to be tracked immediately. If the function is called multiple times by the TriggerFunction the data will be overridden.

Note: define either RumPlugin.set or RumPlugin.append or RumPlugin.setTiming since only one can be used at a time.

setTiming?: DefaultTrackFunction<number>

A function which returns a relative value or a list of relative values to be tracked immediately. If the function is called multiple times by the TriggerFunction the data will be overridden.

Note: define either RumPlugin.set or RumPlugin.append or RumPlugin.setTiming since only one can be used at a time.

shouldExecute?: () => boolean

A function which returns, whether the Plugin should be executed or not. This should be implemented if, for example, there are some execution dependencies/restrictions for a particular use case.

A custom track function with direct access to the RumController. This should be used if the plugin provides data for more than one key or advanced tracking logic is required.

type?: CustomDimensionType | TrackingDataType | "SoftNavigation"

The type of the reported plugin data. If not specified the reported plugin data is treated as Data.

Note: If the plugin is supposed to send custom dimension or custom timer data, the key attribute must also be set, because it is needed to send custom data to the data server.