Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

Copy link
Owner Author

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
You can’t perform that action at this time.