Experience Monitoring has tools to capture API errors or unmanaged JS errors. E.g. Technical errors which were not expected to happen.
However there are many other errors (some expected) which can lead to messages being displayed to users. E.g. “Oops, This product is out of stock” or "This is not a valid zip code’.
Custom Errors enables you to collect and rank by business impact, any handled error message that happens during the user’s experience so you can better understand which fixes to prioritize first.
What are Custom Errors
Custom errors collect any text displayed on the user’s screen E.g. Text message in banners and pop ups or in a form field based on a user action.
Example of a form validation error:
You can also use Custom Errors to collect errors that are not visible to users.
Custom errors contain the following information:
| Error Information | Details |
| The Text message obtained | (E.g. Sorry your account could not be reactivated) |
| The timestamp of the event | |
| Optional Attributes | Information that helps specify the error (type, severity) |
How to collect Custom Errors
Step 1: Enable Custom error collection
First, you need to ensure that custom errors are being collected. This must be done by an Admin user in the Experience Monitoring Settings.
Step 2: Define your Custom error collection
There are two ways to define the collection for Custom errors:
- Using the Contentsquare Tag Configurator’s (CSTC) Custom Error template
- Using the dedicated tag command directly in your website’s code
Generating custom errors for each value
Want to collect custom errors for each Stock Keeping Unit? Follow our guide on Custom Error Grouping to add an attribute for this specific use case.
Examples of custom errors and naming best practices
Please find examples of potential custom errors and recommended naming conventions, for implementation of custom errors, per use case.
To be able to filter and prioritize custom errors easily, it is highly recommended that you use our guide to using attributes to specify the error message.
| Text string example | Errortype (highly recommended) | Additional optional attribute (actual name of values) |
| Generic types and examples |
Key: formValidation formSubmitFail textInfo textError caughtError httpError timeout slowRequest Implementation example: {type: formValidation}
|
Key: critical high medium low ---------------------------------- Key: english french hebrew chinese ---------------------------------- Key: Suggested Values: 404 500 Failed to execute ReferenceError SyntaxError TypeError URIError EvalError InternalError |
FORM COMPLETION
| Message string | Errortype (highly recommended) | Example of additional optional attribute (name of values) |
| Form submit failure |
Key: type {type: formSubmitFail}
|
Key: language Value: english {language: english}
|
| Please select an option |
Key: type {type: formValidation}
|
Key: language {language: english}
|
| Invalid entry number |
Key: type {type: formValidation}
|
Key: language {language: english}
|
| Missing a form field error |
Key: type {type: formValidation}
|
Key: language {language: english}
|
| Timeout for form completion |
Key: type {type: timeout}
|
Key: language {language: english}
|
| This field cannot be left blank |
Key: type {type: formValidation}
|
Key: language {language: english}
|
SEARCH RESULTS
| Message string | Errortype (highly recommended) | Additional optional attribute (actual name of values) |
| No search results error |
Key: type {type: textInfo}
|
Key: language {language: english}
|
| No results found with a particular keyword search |
Key: type {type: textInfo}
|
Key: language {language: english}
|
PRODUCT PAGE (PDP)
| Message string | Errortype (highly recommended) | Additional optional attribute (actual name of values) |
| Product is no longer available |
Key: type {type: textInfo}
|
Key: language {language: english}
|
| Choose a size |
Key: type {type: textInfo}
|
Key: language Value: english {language: english}
|
| Item could not be added to cart |
Key: type {type: textError}
|
Key: language Value: english {language: english}
|
| Exceeded number of items in cart |
Key: type {type: textInfo}
|
Key: language Value: english {language: english}
|
CHECKOUT
| Message string | Errortype (highly recommended) | Additional optional attribute(s) (actual name of values) |
| Payment failure |
Key: type {type: textError}
|
Key: language {language: english},
{severity: critical}
|
| Confirm the security code for this card |
Key: type {type: textInfo}
|
Key: language {language: english}
|
| Item could not be added to cart |
Key: type {type: textError}
|
Key: language {language: english}
|
| Exceeded number of items in cart |
Key: type {type: textInfo}
|
Key: language {language: english}
|
| Promo code did not work |
Key: type {type: textInfo}
|
Key: language {language: english}
|
| Incorrect format for postcode/phone number |
Key: type {type: textInfo}
|
Key: language {language: english}
|
| Voucher code error |
Key: type {type: textError}
|
Key: language {language: english}
|
|
This configuration is no longer available for this date range |
Key: type {type: textInfo}
|
Key: language {language: english}
|
|
Transfer could not be completed at this time |
Key: type {type: textError}
|
Key: language {language: english}
|
|
No items in cart |
Key: type {type: textInfo}
|
Key: language {language: english}
|
LOGIN
| Message string | Errortype (highly recommended) | Additional optional attribute(s) (actual name of values) |
| Password error |
Key: type {type: textInfo}
|
Key: language {language: english}
|
| Login failure |
Key: type {type: textError}
|
Key: language {language: english}
|
| Already have an account |
Key: type {type: textInfo}
|
Key: language {language: english}
|
| Please confirm you aren't a bot |
Key: type {type: textInfo}
|
Key: language {language: english}
|
MISCELLANEOUS
| Message string | Errortype (highly recommended) | Additional optional attribute(s) (actual name of values) |
| Looks like something went wrong |
Key: type {type: textError}
|
Key: language {language: english}
|
| 404 page/Dead end page*
*These kind of errors can be monitored both with a pageview (to be seen in Journey Analysis) and with a Custom Error (to see the impact in Error Analysis). |
Key: type {type: httpError}
|
Key: language {language: english}
---------------------------------- Key: errorStatus {errorStatus: 404}
|
| Key information is missing from your file |
Key: type {type: textInfo}
|
Key: language {language: english}
|
| Track Adblocking |
Key: type {type: caughtError}
|
Key: language Value: english {language: english}
|
| Video is not available/not loaded |
Key: type {type: textError}
|
Key: language Value: english {language: english}
|
| No store around this location |
Key: type {type: textInfo}
|
Key: language Value: english {language: english}
|
| Any service relying on an underlying API/service that is not available |
Key: type {type: textError}
|
Key: language Value: english {language: english}
|
FAQs
Can custom errors be collected retrospectively?
No custom errors cannot be collected retrospectively.
Do I need to add attributes when setting up custom errors?
Attributes are optional but we strongly advise that you specify attributes so the error can be categorized.