Skip to content

Instantly share code, notes, and snippets.

@shime
Created February 23, 2012 12:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shime/1892697 to your computer and use it in GitHub Desktop.
Save shime/1892697 to your computer and use it in GitHub Desktop.
HTML code for Airbrake javascript notifier
<script type="text/javascript">
//<![CDATA[
(function(){
var notifierJsScheme = (("https:" == document.location.protocol) ? "https://" : "http://");
document.write(unescape("%3Cscript src='" + notifierJsScheme + "airbrake.io/javascripts/notifier.js' type='text/javascript'%3E%3C/script%3E"));
})();
//]]>
</script><script src="http://airbrake.io/javascripts/notifier.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
//
// change this variables to fit your application!
window.Airbrake = (typeof(Airbrake) == 'undefined' && typeof(Hoptoad) != 'undefined') ? Hoptoad : Airbrake
Airbrake.setKey('80904ccb1c82c89089e845852f0d67e4');
Airbrake.setHost('airbrake.io');
Airbrake.setEnvironment('development');
Airbrake.setErrorDefaults({ url: "http://0.0.0.0:3000/home/exception", component: "home", action: "exception" });
//]]>
</script>
@shime
Copy link
Author

shime commented Feb 23, 2012

I forgot to note that you should add this above any javascript code in your application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment