BOOMR.plugins. PageParams


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 Group
  • t_other: Custom Timers get added to the beacon as part of t_other. In it, the Custom Timers will be custom[n]|val, separated by commas.
  • custom[n]_st: Start time of a Custom Timer
  • cmet.[name]: Custom Metrics
  • cdim.[name]: Custom Dimensions

Methods


init(config)

Initializes the plugin.

Parameters:

Name Type Description
config object

Configuration

Properties
Name Type Argument Description
PageParams.pageGroups object <optional>

Page groups

PageParams.abTests object <optional>

A/B test variable

PageParams.customTimers object <optional>

Custom Timers

PageParams.customMetrics object <optional>

Custom Metrics

PageParams.customDimensions object <optional>

Custom Dimensions

PageParams.defaultDecimal object <optional>

Default decimal format

PageParams.defaultThousands object <optional>

Default thousands format

PageParams.xhr string <optional>

XHR allowlist/denylist configuration (set to all, match, all or subresource)

PageParams.spaXhr string <optional>

SPA XHR configuration (unset or all)

PageParams.userTimingFromLatestNav boolean <optional>

Whether or not to set the duration of UserTiming marks from the latest navigation (vs. from the first navigation)

Returns:

BOOMR.plugins.PageParams The PageParams plugin for chaining


is_complete()

Whether or not this plugin is complete

Returns:

Type: boolean

true if 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
pageGroups object

PageGroups specific configuration

Properties
Name Type Description
varname string

Name of the beacon param storing the retrieved page group

stopOnFirst boolean

If true the first found value for the page group will be taken as the page group name

abTests object

A/B tests specific configuration

Properties
Name Type Description
varname string

Name of the beacon param storing the retrieved A/B test value

stopOnFirst boolean

If true the first found value for the A/B test name will be taken as the A/B test name

customMetrics object

Custom Metrics configuration

Properties
Name Type Description
cleanUpRE RegExp

Regular Expression for filtering out numeric values from a string of text

customDimensions object

Custom Dimension specific configuration

Properties
Name Type Description
sanitizeRE RegExp

Regular Expression to clean body of text for a custom dimension value

customTimers object

Custom Timers specific configuration

Properties
Name Type Description
cleanUpRE RegExp

Regular Expression to clean up a numeric value to receive a numeric value from a body of text

method function

Function used to set the timer on the beacon

ctx PluginContext

Instance of Plugin to call HandlerConfig#customTimers~method in

preProcessor function

Method to pre process the custom timers value before setting the timer with HandlerConfig#customTimers~method