Ragehooks

The new Ragehooks API is designed to allow you to react to some FullStory frustration events directly in the browser to trigger workflows locally. These events are emitted using the CustomEvent feature in the browser along with addEventListener (Please note this is different from FullStory Custom Events. i.e. FS.event()).

Ragehooks are currently only available withing the web browser client api.

Events can be subscribed to at any level of the DOM, much like normal browser events.

Method

For example, you can subscribe to all rage events at the window level:

window.addEventListener(‘fullstory/rageclick’, function(e) {
    doSomething(e);
});

Or, if you only wish to react to rage events on certain portions of the page you can subscribe on any element:

$(.myButton’).addEventListener(‘fullstory/rageclick’, function(e) {
    doSomething(e);
});

WARNING: As with any other browser behavior, we recommend that you be careful about which behaviors you trigger via this event. It can be spoofed by a malicious actor if they so choose.

Supported Events

  • Rage Click

(We currently only support Rage Clicks, but look for more events in the future.)

Rage Click

Description

This event is triggered by a user Rage Clicking on a given target element. An event will be emitted for each Rage Click. You can find out more about Rage Clicks here.

Event Type

The event type is fullstory/rageclick

Event Details

In the event passed to the event handler, you can access some custom information via the detail property.

Information contained in the detail consists of:

  • eventStartTimeStamp - A DOMHighResTimeStamp of when the event started
  • eventEndTimeStamp - A DOMHighResTimeStamp of when the event ended
  • eventReplayUrlAtStart - The URL that will load the beginning of the session the event occurs within
  • eventReplayUrlAtCurrentTime - The URL that will load the session the event occurs within, at the time the event occurred

How to Subscribe

Method

window.addEventListener(‘fullstory/rageclick’, function(e) {
    doSomething(e);
});

OR

$(.myButton’).addEventListener(‘fullstory/rageclick’, function(e) {
    doSomething(e);
});

Additional Information