Install on a plain HTML page
Put the BetterFeedback embed on a static site or any hand-written HTML page with one script tag, inline in place of a form or floating in a corner, and what to allow in your Content-Security-Policy.
One tag, anywhere in the document. Before </body> keeps it out of the way of everything else.
The script mounts the widget itself and works out which origin to load the conversation from
using its own URL.
Inline, in place of a form
<div id="contact-form"></div>
<script
async
src="https://ask.betterfeedback.ai/widget.js"
data-survey="YOUR_SURVEY_ID"
data-target="#contact-form"
data-auto-height
data-voice="false"
data-accent="#1d4ed8"
></script>data-target renders the conversation inside the matching element and implies inline mode.
data-auto-height lets the frame grow and shrink with the conversation. data-voice="false"
makes it a text-only form: no Talk button, and the frame never asks for the microphone.
If the selector matches nothing, nothing mounts and the console says so.
Floating launcher
Leave out data-target and the embed floats in the bottom-right corner as a launcher that
opens a panel.
<script async src="https://ask.betterfeedback.ai/widget.js" data-survey="YOUR_SURVEY_ID"></script>async lets the page render without waiting for the script. Every option works as a
data- attribute on the same tag: data-position="bottom-left", data-launcher="mic",
data-color-scheme="auto". Configuration lists them all.
Placing the element yourself
Load the script without data-survey and put the element where you want it. A manually placed
element always wins over auto-mounting, and a second copy of the script tag is a no-op.
<script async src="https://ask.betterfeedback.ai/widget.js"></script>
<betterfeedback-widget survey="YOUR_SURVEY_ID" mode="inline" auto-height></betterfeedback-widget>Attributes on the element are the same names without the data- prefix. An element without
target is floating unless you set mode="inline".
Static site generators
Any generator that lets you edit the HTML template takes the same tag in the same place. Put it in the layout or base template so it lands on every page, not in one page's content. A generator with a "custom scripts" or "body includes" setting takes the script URL; add the survey id as a data attribute if the setting allows attributes, or use the element form above.
Content-Security-Policy
With the script, allow both:
script-src https://ask.betterfeedback.ai;
frame-src https://ask.betterfeedback.ai;Voice mode needs allow="microphone" on the frame, which the script sets. If your page sends a
Permissions-Policy header, it must not exclude microphone. With data-voice="false" the
frame is created without the microphone capability and neither applies.
Install
Which of the three install paths fits your page, with the one-line version of each before the page that covers it in full.
Next.js and React
Load the BetterFeedback embed script in a Next.js or React application, let the page own mounting with the JavaScript API, or render the element in JSX, with the queue stub that makes early calls safe.