Tutorials

Classes

Events


beacon

Boomerang event, subscribe via BOOMR.subscribe.

Fired when a beacon was sent.

The beacon variables cannot be modified at this point. Any calls to BOOMR.addVar or BOOMR.removeVar will apply to the next beacon.

Also known as onbeacon.

Properties:

Name Type Description
vars object

Beacon variables


before_beacon

Boomerang event, subscribe via BOOMR.subscribe.

Fired when a beacon is about to be sent.

The subscriber can still add variables to the beacon at this point, either by modifying the vars paramter or calling BOOMR.addVar.

Properties:

Name Type Description
vars object

Beacon variables


before_early_beacon

Boomerang event, subscribe via BOOMR.subscribe.

Fired when an early beacon is about to be sent.

The subscriber can still add variables to the early beacon at this point by calling BOOMR.addVar.

This event will only happen if BOOMR.plugins.Early is enabled.

Properties:

Name Type Description
data object

Event data


before_unload

Boomerang event, subscribe via BOOMR.subscribe.

Fired before the document is about to be unloaded.

window.beforeunload will trigger this.

See:


bfcache

Boomerang event, subscribe via BOOMR.subscribe.

Fired when an BFCache navigation occurs.

The subscriber can still add variables to the BFCache beacon at this point by calling BOOMR.addVar.

This event will only happen if BOOMR.plugins.BFCache is enabled.

Properties:

Name Type Description
data object

Event data


click

Boomerang event, subscribe via BOOMR.subscribe.

Fired when the click event has happened on the document.

See:


config

Boomerang event, subscribe via BOOMR.subscribe.

Fired whenever new configuration data is applied via BOOMR.init.

Also known as onconfig.

Properties:

Name Type Description
data object

Configuration data


dom_loaded

Boomerang event, subscribe via BOOMR.subscribe.

Fired on document.DOMContentLoaded.

The DOMContentLoaded event is fired when the initial HTML document has been completely loaded and parsed, without waiting for stylesheets, images, and subframes to finish loading

See:


error

Boomerang event, subscribe via BOOMR.subscribe.

Fired whenever a page error has happened.

This event will only happen if BOOMR.plugins.Errors is enabled.

Also known as onerror.

Properties:

Name Type Description
err object

Error


form_submit

Boomerang event, subscribe via BOOMR.subscribe.

Fired when any FORM element is submitted.

See:


netinfo

Boomerang event, subscribe via BOOMR.subscribe.

Fired whenever connection information changes via the Network Information API.

This event will only happen if BOOMR.plugins.Mobile is enabled.

Properties:

Name Type Description
connection object

navigator.connection


page_load_beacon

Boomerang event, subscribe via BOOMR.subscribe.

Fired when the page load beacon has been sent.

This event should only happen once on a page. It does not apply to SPA soft navigations.

Properties:

Name Type Description
vars object

Beacon variables


page_ready

Boomerang event, subscribe via BOOMR.subscribe.

Fired when the page is usable by the user.

By default this is fired when window.onload fires, but if you set autorun to false when calling BOOMR.init, then you must explicitly fire this event by calling BOOMR#event:page_ready.

Properties:

Name Type Argument Description
event Event <optional>

Event triggering the page_ready

See:


page_unload

Boomerang event, subscribe via BOOMR.subscribe.

Fired just before the browser unloads the page.

The first event of window.pagehide, window.beforeunload, or window.unload will trigger this.

See:


prerender_to_visible

Boomerang event, subscribe via BOOMR.subscribe.

Fired when the visibilityState of the document has changed from prerender to visible

See:


rage_click

Boomerang event, subscribe via BOOMR.subscribe.

Fired whenever a Rage Click is detected.

This event will only happen if BOOMR.plugins.Continuity is enabled.

Properties:

Name Type Description
e Event

Event


spa_cancel

Boomerang event, subscribe via BOOMR.subscribe.

Fired whenever a SPA navigation is cancelled.


spa_init

Boomerang event, subscribe via BOOMR.subscribe.

Fired whenever a SPA plugin is about to track a new navigation.

Properties:

Name Type Description
parameters Array.<object>

Navigation type (spa or spa_hard), URL and timings


spa_navigation

Boomerang event, subscribe via BOOMR.subscribe.

Fired whenever a SPA navigation is complete.

Properties:

Name Type Description
parameters Array.<object>

Timings


visibility_changed

Boomerang event, subscribe via BOOMR.subscribe.

Fired on document.visibilitychange.

The visibilitychange event is fired when the content of a tab has become visible or has been hidden.

See:


xhr_error

Boomerang event, subscribe via BOOMR.subscribe.

Fired whenever and XMLHttpRequest has an error (if its status is set).

This event will only happen if BOOMR.plugins.AutoXHR is enabled.

Also known as onxhrerror.

Properties:

Name Type Description
data object

XHR data


xhr_init

Boomerang event, subscribe via BOOMR.subscribe.

Fired whenever XMLHttpRequest.open is called.

This event will only happen if BOOMR.plugins.AutoXHR is enabled.

Properties:

Name Type Description
type string

XHR type ("xhr")


xhr_load

Boomerang event, subscribe via BOOMR.subscribe.

Fired when an XMLHttpRequest has finished, or, if something calls BOOMR.responseEnd.

Properties:

Name Type Description
data object

Event data


xhr_send

Boomerang event, subscribe via BOOMR.subscribe.

Fired whenever XMLHttpRequest.send is called.

This event will only happen if BOOMR.plugins.AutoXHR is enabled.

Properties:

Name Type Description
xhr object

XMLHttpRequest object


onBeforeBoomerangBeacon

Public event (fired on document), and can be subscribed via document.addEventListener("onBeforeBoomerangBeacon", ...) or document.attachEvent("onpropertychange", ...).

Maps to BOOMR#event:before_beacon

Properties:

Name Type Description
vars object

Beacon variables


onBoomerangBeacon

Public event (fired on document), and can be subscribed via document.addEventListener("onBoomerangBeacon", ...) or document.attachEvent("onpropertychange", ...).

Maps to BOOMR#event:before_beacon

Properties:

Name Type Description
vars object

Beacon variables


onBoomerangLoaded

Public event (fired on document), and can be subscribed via document.addEventListener("onBoomerangLoaded", ...) or document.attachEvent("onpropertychange", ...).

Fired when BOOMR has loaded and can be used.