This plugin is responsible for handling Page Groups, A/B, Custom Timers, Custom Metrics and Custom Dimensions for mPulse.
For information on how to include this plugin, see the Building tutorial.
Beacon Parameters
This plugin will add Page Group, A/B, Custom Timers, Metrics and Dimensions to the beacon.
h.pg: The Page Groupt_other: Custom Timers get added to the beacon as part oft_other. In it, the Custom Timers will becustom[n]|val, separated by commas.custom[n]_st: Start time of a Custom Timercmet.[name]: Custom Metricscdim.[name]: Custom Dimensions
Methods
-
init(config)
-
Initializes the plugin.
Parameters:
Name Type Description configobject Configuration
Properties
Name Type Argument Description PageParams.pageGroupsobject <optional>
Page groups
PageParams.abTestsobject <optional>
A/B test variable
PageParams.customTimersobject <optional>
Custom Timers
PageParams.customMetricsobject <optional>
Custom Metrics
PageParams.customDimensionsobject <optional>
Custom Dimensions
PageParams.defaultDecimalobject <optional>
Default decimal format
PageParams.defaultThousandsobject <optional>
Default thousands format
PageParams.xhrstring <optional>
XHR allowlist/denylist configuration (set to
all,match,allorsubresource)PageParams.spaXhrstring <optional>
SPA XHR configuration (unset or
all)PageParams.userTimingFromLatestNavboolean <optional>
Whether or not to set the duration of UserTiming marks from the latest navigation (vs. from the first navigation)
Returns:
BOOMR.plugins.PageParamsThe PageParams plugin for chaining -
is_complete()
-
Whether or not this plugin is complete
Returns:
Type: boolean
trueif the plugin is complete -
readyToSend()
-
Determines if Boomerang can send a beacon. Waits for config to have been received or if this is an unload event.
Returns:
Type: boolean
True once the plugin is ready to send
Type Definitions
-
HandlerConfig
-
Properties:
Name Type Description pageGroupsobject PageGroups specific configuration
Properties
Name Type Description varnamestring Name of the beacon param storing the retrieved page group
stopOnFirstboolean If true the first found value for the page group will be taken as the page group name
abTestsobject A/B tests specific configuration
Properties
Name Type Description varnamestring Name of the beacon param storing the retrieved A/B test value
stopOnFirstboolean If true the first found value for the A/B test name will be taken as the A/B test name
customMetricsobject Custom Metrics configuration
Properties
Name Type Description cleanUpRERegExp Regular Expression for filtering out numeric values from a string of text
customDimensionsobject Custom Dimension specific configuration
Properties
Name Type Description sanitizeRERegExp Regular Expression to clean body of text for a custom dimension value
customTimersobject Custom Timers specific configuration
Properties
Name Type Description cleanUpRERegExp Regular Expression to clean up a numeric value to receive a numeric value from a body of text
methodfunction Function used to set the timer on the beacon
ctxPluginContext Instance of Plugin to call
HandlerConfig#customTimers~methodinpreProcessorfunction Method to pre process the custom timers value before setting the timer with
HandlerConfig#customTimers~method