Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Google Analytics works for summary-level error reporting (file, line, error message) but not very well if you want to know the details like a stack trace which can change on each occurrence. That's where the other solutions are much better. GA is certainly better than closing your eyes though.


You are right this isn't necessary a replacement for other solutions. But even if you use other logging solutions, it might be a good idea to log them in GA also so that you can measure the impact of those errors on metrics like conversions.


Yeah, there are definitely limitations. I'm going to keep playing around with the data that gets sent to Google Analytics. File/Line/Message doesn't do much (especially w/ minified js files) but there is likely a clever way to capture and log more information (navigator.* etc) or use try/catch to capture/log the stack trace. Javascript not my strongest area so slow going...


Regardless, thank you very much. Generally there is no 100% perfect solution but a copy&pasteable solution to this issue is the kind of thing I love to come across on HN.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: