Last active
April 4, 2023 18:36
-
-
Save jerkovicl/cba382b2b98e2ee3470f to your computer and use it in GitHub Desktop.
Google Analytics Custom Event Tracking
This file contains 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
https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide | |
_gaq.push(['_trackEvent', 'api error', 'api_name', 'status code: ' + jqXHR.status]); | |
function noErrorMa() { | |
return true; | |
} | |
window.onerror = noErrorMa; | |
window.onerror = function (errorMsg, url, lineNumber, column, errorObj) { | |
if (errorMsg.indexOf('Script error.') > -1) { | |
return; | |
} | |
alert('Error: ' + errorMsg + ' Script: ' + url + ' Line: ' + lineNumber | |
+ ' Column: ' + column + ' StackTrace: ' + errorObj); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment