Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Errorception tracking snippet - extra verbosity edition
<script>var _errs=["<application id here>"];(function(a,b){if(b.location.protocol!="https:"){a.onerror=function(a,c,b)
{_errs.push({m:a,u:c,l:b});return!1};var d=function(){var a=b.createElement("script"),
Note: DO NOT use this script - it is too verbose.
You will have a minified version of this script available to you in your admin settings.
var _errs = ["<application id here>"]; // This is the error "queue" - the only variable we add in the global namespace
(function (window, document) {
// This self-executing function lets us control scope better,
// and gives us better compressibility using common minifiers.
if (document.location.protocol != "https:") { // For now, we aren't supporting https
window.onerror = function (msg, url, line) {
_errs.push({m: msg, u: url, l: line}); // Push new errors into the queue as they occur
return false;
var loader = function () {
var script = document.createElement("script"), tag = document.getElementsByTagName("script")[0];
script.src = "" + _errs[0] + "/beacon.js";
tag.parentNode.insertBefore(script, tag);
// Wait until window.onload before downloading any more code.
window.addEventListener ? window.addEventListener("load", loader, false) : window.attachEvent("onload", loader);
})(window, document);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment