Skip to Content
BetterFeedback Docs

Embed FAQ

Answers to the questions that come up around the embed, from Content-Security-Policy and microphone prompts to the "Powered by" footer, redirects on completion and running two widgets on one page.

What do I need to allow in my Content-Security-Policy?

With the script: script-src https://ask.betterfeedback.ai and frame-src https://ask.betterfeedback.ai. With a plain iframe: frame-src only. Nothing else runs on your origin; the API and the voice connection belong to the frame.

Why does the microphone prompt name ask.betterfeedback.ai?

The conversation runs in a frame of that origin, so the browser attributes the permission to it. The frame carries allow="microphone; autoplay", and a Permissions-Policy header on your page must not exclude microphone, or the prompt never appears. With voice="false" there is no prompt at all.

It is decided by the plan, not by an option. When it shows, the poweredBy copy key changes its text.

The survey redirects on completion. Why does only the frame navigate?

A redirect configured on the survey happens inside the frame. Listen for the completed event, read redirectUrl from its detail and navigate the top window yourself. A plain iframe gets the same information as a bf:completed message.

Can I put two embeds on one page?

Yes: one shell per <betterfeedback-widget> element, each with its own survey. The global betterfeedback() function addresses the first element on the page; call run(name, arg) on the other element directly. A second copy of the script tag mounts nothing extra.

Why does my CSS not reach the conversation?

The conversation is inside a frame, and stylesheets do not cross that boundary. Colour, shape and type reach it through the --bf-* tokens, strings through the copy keys and the typeface through font-url. The shell on your page, launcher, panel and header, is yours to style with ::part() and slots. Theming lists all of them.

What happens when an option value is wrong?

It falls back to the default. A typo in the embed code never takes the embed or your page down. A number above its cap is clamped; a URL that is not https is ignored; an unknown enum value becomes the default.

Does a floating embed load the conversation on page load?

No. The frame is created when the panel first opens, or at once with open-on-load. Inline embeds create it immediately.

On this page