Skip to main content
In-app widgets

Survey widget installation

Use Featurebase surveys to collect feedback from your users and measure customer satisfaction.

Written By Robi Rohumaa

Last updated 4 days ago

πŸ‘¨β€πŸ’» You'll need to write custom code for the setup process. If you're uncomfortable with this, share this guide with a technical team member who can assist.

Featurebase's survey's.
1

Install the Featurebase SDK

Every widget β€” including Survey widget β€” inherits its appId and the signed-in user from a single universal Featurebase install at your app root. Do that first, then come back here for the widget-specific mount call.

πŸ‘‰ Follow Installation overview (it takes about 2 minutes). Your appId lives in Settings β†’ Developers β†’ Installation.

πŸ‘€ Logged-in product? Use a server-signed featurebaseJwt on the universal boot so feedback, responses, and read state are attributed to the right person. See Identifying users & syncing data.

2

Mount the Survey widget

The survey widget can be installed using our JavaScript SDK.

// Inside <FeaturebaseProvider>, anywhere in your tree.
'use client';
import { useSurveyWidget } from 'featurebase-js/react';

export function SurveyHost() {
  useSurveyWidget({
    placement: 'bottom-right',
    theme: 'light',
    locale: 'en',
  });
  return null;
}

The SDK loader <script> is already in your page from Installation overview β€” this tab shows only the widget-specific call you add alongside it.

Triggering the survey

After the widget is installed, each survey will trigger automatically based on the settings you have configured in the Featurebase dashboard.