JavaScript errors can have significant negative impacts on how customers use your site and perceive your brand. From causing user frustration to damaging brand perception, you need to find and fix JavaScript errors as soon as they occur to help maintain site performance and keep your customers happy. New Relic makes pin-pointing these errors straightforward no matter the number or the size, helping you get your site up and running faster and more efficiently.
Finding JavaScript errors
In the interface, select your installed monitor to open it's Summary page. You'll see two charts, one for Error Rate and one for Top 10 error messages. Both of these charts can indicate that you have JavaScript errors, and selecting either chart will take you to the JS errors page for a more detailed view of JavaScript error specific information. If a customer or internal user reports something that could be a JavaScript error, either the Summary page or the JS errors page are good places to begin your search. If you just want to monitor your site for errors, checking the Summary page will be adequate most of the time.
Determining what errors matter
Once you've found the JavaScript errors present on your site, you need to determine which ones you need to fix first. The severity of these errors is complex, and it's based on a number of factors, such as frequency, severity, regions affected, and other various factors.
Using the Top 10 error messages chart above, you can see one error has 6460 instances, which makes it a prime candidate for the first error you might want to fix. Sometimes the most frequently occuring error won't be the one you need to fix first. You may need a wider view of all your errors to determine the order you need to fix them in. The JS errors page, where you can group errors by a variety of factors, such as errorMessage
, pageURL
, deviceType
, gives you that information. Some other things to consider when choosing the priority of your errors:
- Does this error effect your web application, if applicable? If so, improving it over others may improve both the experience and engagement of your users.
- Did this error occur recently? Sometimes focusing on errors that have occurred most recently can help prevent them from becoming larger issues that impact more customers.
- Does this error have impact on user experience? If an error doesn't negatively affect user experience, it may not be worth fixing over errors that do.
Fixing errors fast
Once you've found the error you want to fix, you can select it in the JS errors page to get specific information on it. Selecting Error instances takes you to the Event Log and Stack trace. You'll find data that can help you find what needs to be fixed to resolve the issue, such as the JavaScript file that caused the error and parts in the inline code that need to be fixed. Use the arrows above the Event Log section to scroll through each instance of the error to ensure you've found everything that needs to be fixed until you're error is completely resolved. Use the JS errors page to help keep the JS errors on your site low and your customer satisfaction high!