With client side code ( aka javascript ) becoming a crucial part of modern websites/webapplications, it's also becoming more difficult to know what is happening when the code is actually being executed. Code failing on a server is relatively easy to spot, this is not the case with javascript. Hence, if you're building a serious client side application robust logging is one of the first things you should set up. ( In fact this also holds for backend systems ).
For my own website I'm keeping it simple and I'm leveraging google analytics to log possible errors. As you see this is not rocket science but it's a good way to spot possible errors.