The Clicks plugin tracks all mouse clicks on a page and beacons them to a dedicated endpoint on your server.
For information on how to include this plugin, see the Building tutorial.
Beacon Parameters
The following parameters are sent when a click event is triggered.
element: ThenodeNameof the element that has been clicked (ie.A,BUTTON,NAV, etc.)id: Theidof the element if specifiedclass: Theclassattribute of the elementdocument_height: The height of thedocumentdocument_width: The width of thedocumentviewport_height: The height of the viewport when theclickevent was triggeredviewport_width: The width of the viewport when theclickevent was triggered
Methods
-
init(config)
-
Initializes the plugin.
Parameters:
Name Type Description configobject Configuration
Properties
Name Type Argument Description Clicks.click_urlstring The URL the click events will be beaconed to.
Clicks.onbeforeunloadboolean <optional>
A boolean value for when to send click events. If this is
true, clicks will be sent when the page is unloaded. Otherwise, click events are sent immediately as they occur.Returns:
BOOMR.plugins.ClicksThe Clicks plugin for chaining -
is_complete()
-
This plugin is always complete (ready to send a beacon)
Returns:
Type: boolean
true