Available on Observe plans. Book a call with our Sales team, to learn more about Scale plan features.
The console tracking feature captures JavaScript console errors that your users are experiencing during a session. You can view console errors alongside a recording playback and zoom out to view a trend or other recordings of the same error occurring to see if there's a more widespread issue. By applying an Error filter, you can also refine your session data based on console errors. This enables you to identify issues on your site, investigate the cause, and prioritize a fix.
All Sites initially have console tracking turned off by default. After a team member with Admin permissions has turned on console tracking in your Site settings, future sessions will begin capturing console logs.
This article will cover the following:
- How to turn console tracking on and off
- How to view errors in the Recordings player console
- How to apply the Error filter to your Recordings list
- What types of errors are captured
- FAQs for console tracking
Recordings data cannot be exported when an Error filter is applied
When an Error filter is applied to your Recordings Playback List, it's currently not possible to export this data. If you try to export Recordings data with the filter applied, you'll see the following message: Something went wrong. Please adjust your filters and retry.
How to turn console tracking on or off
Admin permissions are required to make changes to console tracking
You'll need to have Admin permission levels to turn console tracking on or off in your site settings. You can check which team members have the required Admin permission level by visiting your Team page.
Visit your Sites & Organizations page.
Click the site settings gear icon to visit your site settings page.
Click the Session targeting & tracking section on your site settings page.
Click Capture JavaScript errors and console logs to toggle this on or off, then click Save changes.
How to view errors in the Recordings player console
Visit your Recordings page.
Click Play on any recording in the playback list.
Inside the Recordings player, click the Open console icon to show the Recordings console.
In the Session Info tab, you can see if any console errors occurred in the current recording and the number of errors. You'll also be able to view these in the Recordings console above the playback timeline.
When you come across a console error on a recording playback, you can also view a trend or recordings of the same error occurring by clicking on the error icon in the playback toolbar and selecting View trend or the recordings play icon.
When console tracking is turned off, you'll see the message shown below asking you to activate console tracking. If you have Admin permission levels, clicking Switch on console tracking will turn console tracking on. To turn it off again, follow the steps in the How to turn console tracking on or off section above.
You can also create tasks based on console errors using the Jira, Trello or Asana integrations.
How to apply the Error filter to your Recordings list
The Error filter refines your session data based on whether a JavaScript console error occurred or did not occur. You can further refine this filter by specifying conditions for the error text and page URL. This includes whether the error text and page URL contains, is, is not, or does not contain. Currently, the Error filter is only available with the Recordings tool.
What types of errors are captured
We're currently capturing uncaught JavaScript errors that have been thrown via:
-
window.addEventListener('error', errorCapture.onError);
This occurs when there's been an error loading an external file or using a resource. Such as an image, or if a script has an execution error.
-
window.addEventListener('unhandledrejection', errorCapture.onUnhandledRejection);
This can occur when a JavaScript Promise that has no rejection handler is rejected.
FAQs for console tracking
What happens to console tracking if I downgrade my plan?
When downgrading to a plan that doesn't support console tracking, error capturing will no longer work and no console information will be recorded. The console tracking option will be greyed out in your site settings, and the related checkbox will remain 'checked' or 'unchecked' based on what was configured at the time of the downgrade.
If you upgrade your Hotjar Site to an Observe Scale plan in the future, the console tracking feature will resume based on your previously saved configurations. Console tracking will not work unless the Site is on an Observe Scale plan, regardless of the greyed out configurations. Errors that occur while the site is on a non-Scale plan will not be recorded even if the checkbox is 'checked'.
Can I see an overview of all the errors occurring on my site?
There is not a complete list of all errors, but your Dashboard has a section where you can view the Top console errors occurring in your session data. This information is visible in bar/pie chart or line graph form.