Configuring Application Error Messages
Application error messages are collected using the DXA sendApplicationError JavaScript API endpoint. This can be called directly on the page when a message is shown, using one of the following methods.
<script type="text/javascript">
decibelInsight('sendApplicationError', dataLayer.errorMessage);
</script>
Alternatively, a CSS selector can be provided that matches all HTML elements on the page that may contain an application error message. In this case, zero or more error messages that match the provided CSS selector will be tracked by DXA.<script type="text/javascript">
decibelInsight('sendApplicationError', '.error', true);
</script>
Once implemented, you will be able to use the application error reporting feature, along with being able to use application errors as segment filters.