20 November, 2018

Give me back my scroll wheel!

Sorry, this entry is only available in Nederlands.

(Nederlands) Waarom is ... ? Een google Top 25

Simple JavaScript error logging with Analytics

No matter how well you will test your website, some errors will remain. There are just too many OS and browserversion combinations to test them all. Therefore it is important to know which errors your users encounter. This little snippet of code tracks all your JavaScript errors with Google Analytics.

window.onerror = function(error_msg, url, line_number) {
  var error = 'msg: ' + error_msg + '; url: ' + url + '; line:' + line_number;
  _gaq.push(['_trackEvent', 'Error', window.location.pathname, error, 0]);
}

Then, you will see back your errors in Analytics like this.

Analytics error log

What is JSONP?

There is no translation available.

Hello world!

Hi, welcome to my blog!

As the url is already revealing my name is Ewout Kleinsmann. I’m an internet entrepeneur, student Electrical Engineering and I love to travel. This blog will be about all three, but with a strong accent on internet.

Sometimes in Dutch, sometimes in English and sometimes both.