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_unload

Boomerang event, subscribe via BOOMR.subscribe.

Fired before the document is about to be unloaded.

window.beforeunload will trigger this.

See:


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_init

Boomerang event, subscribe via BOOMR.subscribe.

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

Properties:

Name Type Description
navType string

Navigation type (spa or spa_hard)

param object

SPA navigation parameters


spa_navigation

Boomerang event, subscribe via BOOMR.subscribe.

Fired whenever a SPA navigation is complete.


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 an XMLHttpRequest.send() is called

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

Properties:

Name Type Description
req object

XMLHttpRequest


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.