Session replay is an add-on feature for paying customers only. You may try the feature for free for 14 days or 10,000 sessions (whichever comes first), after which you must contact Sales to continue use.
Overview
Session replay enables you to collect error event data directly in Heap. With this error data you can answer key questions such as:
- How many errors occurred over the last week?
- What types of errors are most common?
- Which users are seeing errors?
- How are errors impacting particular user journeys?
Errors on Web Only
Error event collection is currently only available for web data. Support for native mobile app errors and crashes are planned to be released at a later date.
Error Event Types
Heap session replay provides the ability to collect three distinct types of errors:
JavaScript Errors
JavaScript is processed by a user’s browser when they visit a page on your website. If JavaScript code contains mistakes, a JavaScript error will occur. JS Errors are not always visible to users on your site’s front-end, but when they are, users can encounter:
- Error messages
- Pages not loading at all
- Long load times
- Unresponsive CTAs
- Empty dropdown menu
Heap collects a maximum of 20 JS Errors per page view including the following error properties:
Property | Description |
Error Message | The descriptive message found within the error response. |
Error Group ID | An auto-generated ID used to group similar errors together in order to streamline analysis. |
Error After Clicks | The number of error after clicks. |
JS Error File Name | The name of the JS file which caused the error. |
JS Error Line Number | The line of the JS file which caused the error. |
JS Error Column Number | The column number of the JS file which caused the error. |
API Errors
Error analysis with API error monitoring tracks two types of HTTP-based APIs, sent by the user-agent (browser) to Servers:
- XMLHttpRequest API: The most commonly used API, which can be used to exchange data between a user-agent (browser) and a server.
- Modern Fetch API: Similar to XMLHttpRequest APIs but with a more powerful and flexible feature set.
Heap collects a maximum of 20 API Errors per page view including the following error properties:
Property | Description |
Error Group ID | An auto-generated ID used to group similar errors together in order to streamline analysis. |
Error After Clicks | The number of error after clicks. |
API Error Duration | The length of time (in ms) it took to receive the response. |
API Error Endpoint | The URL endpoint destination of the API request. |
API Error Status Code | The relevant error response status code (400-599 codes). |
API Error Method | The request method, the two most common HTTP methods are “GET” and “POST”. GET requests data and POST sends it. |
Custom Errors
Custom errors requires manual code implementation, but allows you to collect any relevant page information as an error. (See below for specific instructions.)
This is most commonly used to capture text displayed on the user’s screen such as text messages in banners and pop ups or in a form field based on a user action. A common example of a form validation error can be found below:
Heap collects a maximum of 20 Custom Errors per page view including the following error properties:
Property | Description |
Error Message (Optional) | The descriptive message of the Custom Error. This is configured as part of the Custom Error tracking code. See below for more details on how to implement Custom Error tracking on your website. |
Error Group ID | An auto-generated ID used to group similar errors together in order to streamline analysis. |
Error After Clicks | The number of error after clicks. |
Enabling Error Collection
Personal Data in Errors
It is important to ensure you are not collecting personal data when enabling error event collection. Follow these instructions to remove personal data in API Errors if applicable.
Error event collection can be managed by navigating to Account > Manage > Replay & Heatmaps within Heap. Click Edit next to your website session replay configuration and within the fly-out panel under General Settings, scroll down and click on the Error Capture section.
Within the Error Capture section you will see three switches for JavaScript Errors, API Errors, and Custom Errors. Activate or deactivate these switches to turn on or off collection of these specific types of errors. Click Save when finished.
Collecting Custom Errors require instrumenting javascript code on your website in addition to activating the switch described above. Click here to learn how to implement Custom Errors.
Using Error Events in Heap Analysis
Once error event collection has been activated, any sites and/or pages where session replay is configured to be capturing data will automatically begin collecting error events as native events within Heap’s analysis modules. The will allow you to use errors in a variety of different ways including:
- Measure frequency of errors over time
- Identify number of users impacted by an error
- Segment users based on whether they experienced an error event
- Leverage errors in funnels and journeys
- Build Charts with Errors using Heap’s CoPilot AI
- Send errors to your data warehouse via Heap Connect
In this example below, we’ve created simple graph over time to show the number of daily API Errors containing the term “heap” to better understand which endpoints are causing the most issues:
FAQs
Does error collection require a separate subscription?
No. Error collection is included within the existing Heap Session Replay add-on subscription at no additional cost.
Can errors be collected retroactively?
No. Errors are only collected after collection has been enabled within the session replay configuration.
Can error collection be enabled without session replay capture?
No. Error collection is tied to session replay and therefore session replay capture must be active on a page in order for error collection to be enabled.