WebmasterID logoWebmasterID
Event tracking

Error click detection

An error click is a UX-signal event where a user's click is shortly followed by a JavaScript error, suggesting the click triggered a fault. Experience tooling correlates click timing with the next thrown error within a window. It is a derived signal, not a native GA4 event; emit it as a custom event. Unlike a dead click (no reaction) it indicates the handler ran and failed.

Partially verified

How the correlation works

The rule is: a click happened, and within a short window an error was thrown (via window.onerror or unhandledrejection). The window length is a tool convention. Because there is no native error_click event, you listen for both, match them by time, and send a custom event. This connects the symptom (a click) to the fault (an error) so you can find the failing handler.

Where it sits among UX signals

Error clicks complete a trio with dead clicks and rage clicks. A dead click means nothing happened; an error click means something happened and broke; a rage click means the user got frustrated enough to repeat. Triaging by signal lets you route inert controls to design and failing controls to engineering, instead of treating all unhappy clicks the same.

How it appears in analytics and logs

An error click means the click reached a handler that then threw — a runtime fault in your code — rather than an inert or misleading element.

Diagnostic use case

Pinpoint controls whose handlers throw by correlating each click with any JavaScript error fired immediately after, so you fix the failing code path.

What WebmasterID can help detect

WebmasterID's first-party model can record a non-identifying error-click signal linking a selector to an error class, without storing replays of real people.

Common mistakes

Privacy and accuracy notes

Correlation needs the clicked selector, timing, and a sanitised error type — never the visitor's identity or any PII embedded in error messages. Strip message contents that could carry personal data.

Related pages

Sources and verification notes

Last reviewed 2026-06-24. Facts are checked against primary/official sources where available; uncertain specifics are marked “Data not yet verified” rather than guessed.