This guide shows how to add the Novella Website widget to your site so you can collect feedback and see privacy-conscious traffic context alongside survey responses.
Once installed, the Website widget can:
<script defer src="https://surveys.novellahq.com/widgets/1.0/novella.js" data-workspace="YOUR_WORKSPACE_KEY"></script>
Once loaded, the script retrieves your active widget settings and evaluates their URL, trigger, priority, and frequency rules in the visitor's browser.
If your website or tag manager knows the visitor, you can pass optional personalization values:
<script defer src="https://surveys.novellahq.com/widgets/1.0/novella.js" data-workspace="YOUR_WORKSPACE_KEY" data-firstname="{{ first_name }}" data-lastname="{{ last_name }}" data-email="{{ email }}" data-company="{{ company_name }}"></script>
Personalization is included in an encrypted, short-lived widget token. It is not placed directly in the survey iframe URL or traffic event payload. Unresolved template placeholders are ignored.
If your consent manager must authorize feedback or analytics before the widget starts, set data-autoload="false":
<script defer src="https://surveys.novellahq.com/widgets/1.0/novella.js" data-workspace="YOUR_WORKSPACE_KEY" data-autoload="false"></script> <script> function onNovellaConsentGranted() { window.NovellaWebsiteWidget?.load(); } </script>
Call load() once consent is granted. No widget configuration or Novella website pageview is sent before that call.
To keep feedback surveys enabled while disabling Novella's lightweight website analytics, set data-analytics="false":
<script defer src="https://surveys.novellahq.com/widgets/1.0/novella.js" data-workspace="YOUR_WORKSPACE_KEY" data-analytics="false"></script>
Survey interaction events are still recorded after a respondent opens a survey.
When website analytics is enabled, the runtime records an initial pageview and distinct client-side route changes. Novella stores:
When a visitor submits feedback, Novella can relate that sentiment to the page, referrer, and campaign context using shared visitor and session identifiers. Novella does not use IP addresses or user-agent strings to join traffic to survey sentiment.
If your site uses Content Security Policy, merge these sources into your existing directives:
script-src https://surveys.novellahq.com/widgets/1.0/novella.js
connect-src https://surveys.novellahq.com/api/widgets/
frame-src https://surveys.novellahq.com
Do not replace your complete CSP with this example. Your existing application will likely require additional sources.
The widget detects navigation through history.pushState, history.replaceState, and browser back/forward navigation. It re-evaluates URL rules and records each distinct SPA URL once during the current page runtime.
If your application changes content without updating browser history, call:
window.NovellaWebsiteWidget?.refresh();
Test consent-controlled installations both before and after consent is granted.
The current origin is not authorized for the workspace, or the customer does not have a valid primary domain. Use HTTPS and verify the domain in Novella.
Check whether frame-src permits https://surveys.novellahq.com. Widget frames use a dedicated, token-protected embed endpoint rather than the public standalone survey URL.
Inspect the rendered script element, not the unprocessed template, to verify that your application or tag manager resolved the personalization placeholders. Empty, invalid, and unresolved values are intentionally discarded.
Widget presentation, survey selection, triggers, URL rules, and frequency are managed in Novella and normally do not require snippet changes. To remove the widget and website analytics entirely, remove the script element from your site or tag manager.