Quickstart

Get UserContext running in under 5 minutes.

Prerequisites

  • A UserContext account
  • A project created in the dashboard
  • Your API key (find it in Project Settings)

Choose your integration method

npm Package

Install the SDK:

bash
npm install @usercontext/widget

Initialize in your application entry point:

typescript
import { UserContext } from '@usercontext/widget';

UserContext.init({
  apiKey: 'uc_your_api_key',
});

Script Tag

Add these two script tags before the closing </body> tag:

html
<script src="https://cdn.usercontext.com/widget.js"></script>
<script>
  UserContext.init({
    apiKey: 'uc_your_api_key',
  });
</script>

Chrome Extension

  1. Download from the Chrome Web Store (or load unpacked for development)
  2. Click the extension icon
  3. Enter your API key
  4. Click “Save & Start Monitoring”

Verify it works

  1. Visit a page with the widget installed
  2. Open the browser console and run:
    javascript
    throw new Error("Test error")
  3. Go to your UserContext dashboard — you should see the error captured
  4. (Optional) Create a full issue programmatically:
    javascript
    UserContext.reportIssue("Testing my integration")