Add this script tag to your HTML, just before the closing body tag:
| Attribute | Required | Description |
|---|---|---|
| data-project | Yes | Your project ID from the dashboard |
| data-theme | No | "light" (default) or "dark" |
| data-api | No | Custom API endpoint (for self-hosting) |
Feature requests can have one of five statuses:
The widget works on any domain out of the box. However, if your site sets a strict Content Security Policy, you need to allowlist featurevoter.com in two directives:
| Directive | Required | Purpose |
|---|---|---|
| script-src | Yes | Allows the browser to load widget.js from FeatureVoter |
| frame-src | Yes | Allows the widget iframe hosted on featurevoter.com |
| connect-src | No | Not needed — all API calls happen inside the iframe |
Example HTTP header:
The same directives apply if you use a <meta http-equiv="Content-Security-Policy"> tag instead of an HTTP header.
If the widget does not appear, open the browser console and look for Refused to load or Refused to frame errors — these indicate a missing CSP directive.
Widget not appearing
Check the CSP directives above. Also verify that the data-project value in your embed code matches the project ID in your dashboard.
Votes not persisting
Aggressive browser privacy settings or extensions may block the iframe's localStorage. In that case the widget falls back to a session-only identifier and votes will not persist across page reloads.
Widget overlapping site elements
The widget uses position: fixed, z-index: 999999, and is pinned to the bottom-right corner. If it overlaps important UI, you can adjust its position with CSS targeting #featurevoter-widget.