How to track rage clicks (or broken buttons and links)

One of the things that most people don't think of is broken buttons or links.

And why would you? 

Unless you're actively clicking every button on your site it's so easy to miss links that aren't working.

The following script will report to Bento (or your analytics provider of choice) when a visitor is rage clicking a button but nothing is happening.

Then, once you are logging that event, you can either: 
1) Email that user to apologise (using Bento's workflow automation).
2) Ping your team on Slack (using Bento's workflow automation).
3) Add an issue to the Kanban Board in your account (using Bento's workflow automation).

Using this script I've been able to find so many missed errors on my behalf across the domains I run.

Just add it to the footer of your site OR deploy as a code personalisation within Bento and target all visitors (or just customers, via a tag or custom field, if you run a web app).

How to track rage clicks with Javascript 

    function trackRageClicks() {
        // Set a threshhold and number of clicks it takes to set off this event.
        const CLICK_TIME_THRESHOLD = 3000;
        const CLICK_COUNT_TRESHOLD = 3;

        let last = bento_time_now();
        let count = 0;

        // Create a listener that monitors the clicks.
        window.addEventListener('mouseup', (e) => {
            const current = bento_time_now();
            if ((current - last) < CLICK_TIME_THRESHOLD) {
                count += 1;

            if (count > CLICK_COUNT_TRESHOLD) {
                const {
                } =;
                if (TRACKED_RAGECLICK == false) {
                    // Log it in Bento.
 // You can also add bento.tag('frustrated') here if you'd like.
                    bento.track("$frustrated", {
                        action: "rage_click",
                        'target': {
                    TRACKED_RAGECLICK = true;
            last = current;

Leave a reply