Fix widget CSP and connection errors
Allow the widget's script and network requests, then distinguish CSP failures from API errors.
Identify what the browser blocked
Open the browser console and Network panel. A Content Security Policy error names a directive such as script-src or connect-src and the URL it blocked. A blocked browser request may never reach Pollenate, so it will not have the same response as an API validation error.
The script widget loads from https://pollenate.dev/widget.js and calls https://api.pollenate.dev for collection and impression requests.
Merge the required origins into your policy
A simplified policy fragment is:
Content-Security-Policy:
script-src 'self' https://pollenate.dev;
connect-src 'self' https://api.pollenate.dev;This is a fragment to adapt, not a replacement for your application's complete policy. Keep the other origins your application requires. Multiple CSP headers are enforced together; adding a permissive second policy does not override a restrictive first one.
If the console reports blocked widget styles, inspect your style policy. Both the script widget and packaged React component inject presentation styles; a strict policy can block those even when the script loads. Your application's security configuration determines whether to permit that style mechanism or build a custom UI with styles you manage.
A CSP meta element can carry the same relevant directives when appropriate for your site's setup:
<meta
http-equiv="Content-Security-Policy"
content="script-src 'self' https://pollenate.dev; connect-src 'self' https://api.pollenate.dev;"
>Again, merge with your existing policy; do not paste this minimal example over a complete production policy.
Check installation and credentials
- Confirm the script returned 200 and is not blocked by an extension or an incorrect URL.
- Inspect
data-inbox-keyanddata-api-key; replace placeholders with the correct inbox key and organization collect key. - Confirm the key has
collect, and that its brand restriction matches the inbox. - Check the POST to
/collect. A 201 means the event persisted. A 401/403/404 needs the collection error guide, not a broader CSP. - A 429 needs the indicated rate-limit reset; repeatedly refreshing the page can make it worse.
Pollenate's public widget endpoints support cross-origin requests. The organization management API has different CORS behavior; call it from your trusted backend rather than assuming every endpoint is a browser widget endpoint.
Separate demo behavior from a live installation
The script's demo mode, including data-demo="true", does not submit a real response. The local examples on marketing pages also stay in the browser. Remove demo configuration in your real installation and submit one intentional test response, then check the correct inbox.
For embedded Feedback Pages, account for your page's frame-src policy as well. An iframe and a script widget load different resources; compare the exact blocked URL with the sharing and embedding guide.