For the latest stable version:
npm install @infrasightlabs/backtrace
Include the script and specify a capture url:
backtrace.configure.setCaptureUrl('http://example.com/capture');
or in the script tag:
<script type="text/javascript" src="backtrace.js" data-capture-url="http://example.com/capture"></script>