クライアントエリアー(ブラウザ)を収集する
/* collect client errors */
var reportingUrl = "http://some-recieve-url.com/";
window.onerror = function(message, file, lineNumber,col, error) {
new Image().src = reportingUrl+"?message="
+ encodeURIComponent(message)
+ "&url=" + encodeURIComponent(location.href)
+ "&file=" + encodeURIComponent(file)
+ "&lineNumber=" + encodeURIComponent(lineNumber)
+ "&userAgent=" + encodeURIComponent(navigator.userAgent);
};