JavaScript SDK
The Bugbattle SDK for JavScript is the easiest way to integrate Bugbattle into your apps! Achieve better app quality & ratings with comprehensive in-app bug reporting. BugBattle offers affordable In-App Bug Reporting for Apps, WebApps & Websites.
For the SDK to work, you need an API Token. Start your 14-day free trial at app.bugbattle.io to get your API token.

πŸ— Installation

Add the following code snippet to your website's / webapp's <head>-tag.
1
<script src="https://widget.bugbattle.io/widget/YOUR-SDK-TOKEN-HERE"></script>
Copied!
Congrats, you are now all set πŸŽ‰ Report your first bug by using the feedback button.

πŸ‘·β€β™‚οΈ Advanced Installation

Bugbattle loads asynchronously, which means you need to wait until it is ready. We offer a callback (window.onBugBattleLoaded), which get's called once the Bugbattle SDK has been loaded successfully.
1
<script>
2
// Wait for Bugbattle to be loaded.
3
window.onBugBattleLoaded = function (BugBattle) {
4
// Attach custom data specific to your application
5
BugBattle.attachCustomData({
6
type: "office_dog",
7
name: "Freija"
8
});
9
10
// Set your customer's email, so the customer won't get asked.
11
BugBattle.setCustomerEmail("[email protected]");
12
};
13
</script>
14
<script src="https://widget.bugbattle.io/widget/YOUR-SDK-TOKEN-HERE"></script>
Copied!

🀝 Need help?

We are here to help! [email protected]​
Last modified 3mo ago