This guide helps you create your own Bugpilot widget or custom bug reporting flow.

<aside> ⚠️ If you are interested in doing minor style changes to the default Bugpilot widget and bug reporting flow checkout out this document.

</aside>

What's the Bugpilot SDK?

The Bugpilot SDK for JavaScript is an easy way to start bug reporting from your app’s front-end.

Prerequisites

To get started using the Bugpilot SDK, you must follow these steps:

  1. Signup for Bugpilot.
  2. Install the Bugpilot tracking code to your web app.
  3. Identify your users.

Using the SDK

The SDK methods are available on the global Bugpilot object. By default, the Bugpilot tracking code loads asynchronously, to minimize the impact on your pages performance. Before calling any SDK method, make sure the page has finished loading.

Before we begin:

  1. If you're developing your own bug-reporting flow, please ensure that the default Bugpilot widget is disabled.
  2. By default, no UI elements will be displayed. It is your responsibility to design the UI and flow. Ensure there's a textarea or input field where users can insert their description.
  3. To start reporting a bug you will need to call the function saveReport. It’s important to know that Bugpilot will keep recording for up to 2 minutes. Make sure you don't call the function too early in the flow, so your users have plenty of time to record their screens and report bugs.
  4. Bugpilot will also save about 2 minutes of the recording that was carried out before the saveReport function was called.