Installation
Detailed installation guide for the Annot8 widget
Installation
Learn how to install Annot8 on any website or web application.
Basic Installation
Add the Annot8 script to your website, just before the closing </body> tag:
<script
src="https://cdn.annot8.app/widget.js"
data-project-id="YOUR_PROJECT_ID"
async
></script>Replace YOUR_PROJECT_ID with your actual project ID from the dashboard.
Script Attributes
| Attribute | Required | Description |
|---|---|---|
data-project-id | Yes | Your unique project identifier |
data-convex-url | No | Custom Convex deployment URL |
data-config | No | JSON configuration object |
CDN Options
Production CDN (Recommended)
<script src="https://cdn.annot8.app/widget.js" async></script>Self-Hosted
You can also self-host the widget:
npm install @annot8/widgetimport { initAnnot8 } from '@annot8/widget'
initAnnot8({
projectId: 'YOUR_PROJECT_ID'
})Content Security Policy (CSP)
If your site uses CSP, add these directives:
script-src 'self' https://cdn.annot8.app;
connect-src 'self' https://*.convex.cloud;
style-src 'self' 'unsafe-inline';Verify Installation
After installation, you should see:
- A floating toolbar in the bottom-right corner
- The ability to click and add comments when in comment mode
The widget only shows for authenticated users by default. Use public links for anonymous feedback.
Troubleshooting
Widget Not Showing
- Check browser console for errors
- Verify your project ID is correct
- Ensure your domain is in the allowed domains list
- Clear browser cache
Comments Not Saving
- Check that you're authenticated
- Verify your Convex connection
- Check network requests for errors