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/widgetInitialize 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
- Download from the Chrome Web Store (or load unpacked for development)
- Click the extension icon
- Enter your API key
- Click “Save & Start Monitoring”
Verify it works
- Visit a page with the widget installed
- Open the browser console and run:javascript
throw new Error("Test error") - Go to your UserContext dashboard — you should see the error captured
- (Optional) Create a full issue programmatically:javascript
UserContext.reportIssue("Testing my integration")