Client-side JavaScript error logging means capturing the errors, console messages, and network requests that happen in a user’s browser, so developers can see what went wrong without reproducing the bug themselves. You can do it with window.onerror handlers, a dedicated error-monitoring tool, or a feedback tool that attaches the browser console log to each bug report.
Browsers now run full applications, which means more bugs happen on the client side, where developers can’t see them. Without logs, a report like “the button doesn’t work” can take hours to reproduce.
This post explains why client-side error logging matters and how to attach console logs to bug reports with Usersnap.
JavaScript is the de facto standard language of the web. With all those JavaScript libraries popping up, developers demonstrating that almost everything is possible in browsers. It’s safe to say that JavaScript has become the most widespread programming language for web applications.
Or, as Eric Elliott would state it:
JavaScript has the potential to help a lot of more people, because it’s the most popular language in the world.
OK, so we all know that JavaScript is widely used in many applications and websites. But why should you log client-side errors?
The short answer is: because you do not want to spend hours and hours reproducing bugs. And if you’re using JavaScript, especially non-trivial JavaScript, in your code base, you will have a hard time finding those bugs.
And because there are so many different browser versions, operating systems and devices out there, it’s much harder to produce high-quality JavaScript code that works everywhere.
Especially if you compare this to the olden days of server-side code…
Let’s keep this short. Too few websites log JavaScript errors.
I guess we’ve all been there. How do you describe a bug in order to make it reproducible for the developer in charge?
When it comes to client-side JavaScript errors, people have a hard time reporting the issue. A simple “the button doesn’t work” isn’t sufficient. Developers in charge of finding those bugs need answers to a lot more questions, such as: What was the user doing before the error occurred?
So, how do we avoid all those ping pongs between bug reporter and developer and spend the time on actual bug fixing?
The basic problem of client-side JavaScript errors looks something like this:
At this point, you will probably agree that it’s time for a way to attach the console output to get high-quality bug reports.
The Usersnap console recorder records your users’ browser console while they use the feedback widget. It adds JavaScript errors and network requests (XHR and Fetch) to every feedback item they submit.
Your developers see the log on each feedback item under “More details”, in the Console Recorder tab, next to the screenshot and browser details.
So how do you make everyone’s life easier and start recording client-side JavaScript errors?
Step 1: Install the Usersnap feedback widget
Add the Usersnap snippet to your website or web app.
Step 2: Switch on console recording
In your feedback project, go to Configure, then Manage, Settings, and switch on console recording. The console recorder is a gated feature, so contact Usersnap support if you don’t see the option.
Step 3: Collect feedback
When users submit feedback through the widget, the console log is attached automatically.
You’re good to go.
A few limits to know: the recorder only works when feedback is created through the widget (not the browser extension or on mobile devices), and errors that happen very early in page load can be missed because Usersnap loads asynchronously. AngularJS apps need a small library to capture internal errors.
I guess the good old days of not logging client-side JavaScript errors are over. Aside from the Usersnap Console Recorder, there are also some other great applications out there which help developers in their bug tracking efforts.
Usersnap is a product evidence platform that connects what people say, what you build, and how it lands. With the console recorder on, every bug report comes with the context developers need.
Try Usersnap free, no credit card needed.
Every PM is being told to become an AI PM right now. Building got radically…
Eighty percent of businesses believe they deliver a great customer experience. Eight percent of their…
Customer feedback analysis software turns scattered customer feedback (surveys, in-app messages, support tickets, reviews, and…
A voice of customer survey asks customers what they think, in their own words. Run…
If you are a product manager or SaaS founder, your hardest question isn't whether to…
A user research repository is a shared, searchable place where a product team stores research…