This guide helps you install and correctly configure Bugpilot.

<aside> ❓ This page is for a technical audience. If you are not a developer, you may want to send this page link to a developer who can complete the setup.

</aside>

<aside> ✅ Installing the Bugpilot Tracking code is required to use any Bugpilot functionality.

</aside>

TLDR: Example Installation

Step 1: Install the Tracking Code

To install the Bugpilot script, copy the code snippet shown in your Bugpilot dashboard. It is unique to you as it includes your Workspace Id.

Adjust your Content Security Policy

If your application uses Content Security Policies (CSP), you must include these additional origins for Bugpilot to work:

Step 2: Send User Information

To simplify debugging and integrate with most apps, you can send some User information to Bugpilot. Our goal is to make it easier for your team to debug issues by having user information, such as id, email, name, user subscription, trial status, or any user properties that might be useful in your case.

<aside> ⚠️ Sending user information is required to make some help desk integrations work. If you're using a help desk integration, make sure to send the same user id and email you are using to initialize your help desk widget.

</aside>

Here is how to do it:

window.Bugpilot.identify({
      id: "user1234", // Required. Replace with actual user id.
      email: "[email protected]", // Required. Replace with actual user email.
      // Optional:
      firstName: "Jane",
      lastName: "Doe",
      subscriptionStatus: "active", // 'active', 'trialing', 'deleted'
      // Any other property you want to store:
      // attr1: val1,
			// attr2: val2,
});

To clear the user info (i.e. when the user logged out) call our logout function.