Documentation Index
Fetch the complete documentation index at: https://docs.bugbybug.com/llms.txt
Use this file to discover all available pages before exploring further.
This guide will walk you through integrating and using the BugByBug Browser SDK in your web application.
Install the SDK
npm install @bugbybug/browser
Import into your app
Initialization the SDK into your index.js or main.tsimport * as BugByBug from '@bugbybug/browser';
BugByBug.init({
apiKey: 'YOUR_PROJECT_API_KEY', // Starts with bbb_
environment: 'production'
});
app.mount('#app');
Basic Usage
Once initialized, you can start using the SDK to track users that have issues or errors within your project.
Identifying Users
To track users experiencing errors, you can do achieve like this:
Capturing an Error Manually
try {
// Your code that might throw an error
throw new Error('Something went wrong!');
} catch (error) {
BugByBug.captureException(error);
}
Integrations
The Browser SDK can be extended with various integrations for specific frameworks or functionalities.
For more detailed information on specific framework integrations, refer to their dedicated guides:
API Reference
For a complete list of available methods and their signatures, refer to the API Reference.