Created
January 11, 2013 09:21
-
-
Save shoyan/4509208 to your computer and use it in GitHub Desktop.
javascriptのエラーをanalyticsに送る
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.onerror = function(message, file, lineNumber) { | |
_gaq.push([ | |
'_trackEvent', | |
'error', | |
file + ':' + lineNumber, | |
message + '' | |
]); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment