Safety events
Clarity safety events flag errors and performance issues so you can detect and resolve them fast. For remediation guidance, see Clarity optimization.
clarity_error
Tracked when Clarity encounters a recoverable error that the system caught and handled. Clarity may keep running after the error, but the event signals that something went wrong and needs investigation.
Attributes
| Attribute | Description | Values |
action | Event action type. | clarity_error |
type | The specific error condition. | Common conditions include empty or invalid product IDs, and product IDs that aren't returned as strings. |
location | Where the error originated | See values |
message | Error message. | Free-text |
chat_widget_state | State of the chat widget when the error occurred, when applicable. | minimized, bubble, open |
chat_widget_size | Size of the chat widget, when applicable. | large, small, half_screen, full_screen |
conversation_state | State of the conversation, when applicable. | initial_message, welcome_message, home_screen, conversation, idle |
chat_config | Webchat configuration, when applicable. | JSON string |
latency | For backend errors, time elapsed before the error, in milliseconds. | Example: 1240 |
location values
| location value | Description |
FE:chat_close | The error occurred when the chat window was closed or dismissed. |
FE:user_active | The error occurred while the shopper was actively using the chat. |
FE:user_passive | The error occurred while the chat was open, but the shopper wasn't interacting with it. |
Back_end | The error originated on the server. This is not related to your browser or actions. |
FE:app_error_boundary | A critical error caused the chat to stop working unexpectedly. |
clarity_warning
Tracked when Clarity hits a recoverable issue that doesn't stop it from running, but is worth flagging. It carries lower severity than clarity_error.
Attributes
| Attribute | Description | Values |
action | Event action type. | clarity_warning |
type | The specific warning condition. | Common conditions include misconfigurations, unrecognized hook keys, or deprecated configuration values. |
message | Warning message. | Free-text |
chat_widget_state | State of the chat widget when the warning occurred. | minimized, bubble, open |
chat_widget_size | Size of the chat widget. | large, small, half_screen, full_screen |
conversation_state | State of the conversation. | initial_message, welcome_message, home_screen, conversation, idle |
chat_config | Webchat configuration. | JSON string |

