Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save yahelc/928782 to your computer and use it in GitHub Desktop.
Save yahelc/928782 to your computer and use it in GitHub Desktop.
window.onerror_old = window.onerror;
window.onerror = function (msg, url, line) {
if(window.onerror_old){ window.onerror_old(); }
_gaq = _gaq || [];
_gaq.push(['_trackEvent', 'Error Log', msg, url+'_'+line]);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment