fydbek Create an account

fydbek / Install guide

How to add fydbek to your website

Plain HTML, WordPress, Astro, Next.js, site builders and Google Tag Manager. Strict mode, CSP and how to check the install.

fydbek is a widget that lets clients, designers, copywriters and testers leave feedback right on the page. You add it with one line of code in the page head. Only people you invite by email or send a feedback link will see the toolbar. Regular visitors see nothing.

On this page:

Before you start

Sign in at app.fydbek.com (with a magic link or Google) and create an organization and your first project. One project is one website. You find the install code in project settings under Installation. Onboarding shows it too.

Allowed sites

The widget only runs on the addresses listed in the project's Allowed sites tab. Add every address where you want feedback, for example production and staging. For subdomains of your own domain you can use a wildcard such as https://*.staging.client-site.com. On shared hosting like vercel.app or netlify.app, add the exact address, wildcards are not allowed there. Plain http works only for local development: localhost, *.test and *.ddev.site.

Plain HTML and PHP templates

Add the code to the <head> of every page. Copy your own code from fydbek. This example uses a placeholder key:

<script src="https://cdn.fydbek.com/loader.js" data-project="fyd_pk_..." async></script>

The fyd_pk_ key is public. It only tells fydbek which project the site belongs to and grants no access by itself. The script loads async and does not block the page. Regular visitors download only a small loader. The widget itself loads only for people signed in to fydbek or arriving from an invite or a feedback link.

If your site has a shared header template (such as header.php), adding the code there once is enough.

WordPress

On WordPress you don't have to touch the theme. Use the fydbek plugin.

  1. Download the plugin: fydbek.zip. The dashboard links to it in the Installation tab as well.
  2. In WordPress, upload it as a new plugin (the Upload Plugin button in the Plugins section) and activate it.
  3. Go to Settings, fydbek, paste the install code (or just the project key) and save.
  4. Make sure the site address is among the project's allowed sites.

The plugin adds the loader to the page head, not to RSS feeds or embeds. In its settings you choose who gets it: everyone (recommended, so clients don't need a WordPress account) or only users signed in to WordPress. A fydbek item appears in the WordPress admin bar and opens the toolbar on the page you are viewing.

On multisite, each site has its own settings, so each one can belong to a different fydbek project. New plugin versions show up under WordPress updates like any other plugin. The plugin needs WordPress 6.3 and PHP 7.4 or newer.

The plugin does not support strict mode. If you want strict mode on WordPress, add the strict code with a plugin for custom header code (such as WPCode) or in the theme's header.php.

Astro

Add the code to the <head> of your shared layout (usually src/layouts/*.astro). Add is:inline so Astro leaves the tag alone instead of processing it as its own script:

<script is:inline src="https://cdn.fydbek.com/loader.js" data-project="fyd_pk_..." async></script>

For the strict code, is:inline is required. Without it Astro bundles and rewrites the script, and the CSP hash no longer matches. Put <!-- prettier-ignore --> right above the tag so Prettier does not reformat it. If Astro generates your CSP (security.csp), the hash goes into scriptDirective.hashes and https://cdn.fydbek.com into scriptDirective.resources.

Next.js and React

The easiest way is the fydbek npm package. It adds the same loader as the HTML snippet and nothing else.

npm install fydbek
// app/layout.tsx
import { Fydbek } from 'fydbek/react';

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <body>
        {children}
        <Fydbek projectKey="fyd_pk_..." />
      </body>
    </html>
  );
}

The component renders nothing and adds the loader only once, even under StrictMode. To run fydbek on staging only, use the disabled prop with an environment variable. Without React, call loadFydbek({ projectKey: 'fyd_pk_...' }) from the fydbek package.

Without the package, use next/script with strategy="afterInteractive" and keep the data-* attributes as they are.

The strict code works differently in Next.js. Put it in the <head> of the root layout (or pages/_document) as <script dangerouslySetInnerHTML={{ __html: '...' }} />. Don't use next/script for it.

Webflow, Shoptet and other site builders

Site builders have a custom code field for the site header in their settings. Paste the whole install code there, save and republish if your builder needs it. If a builder does not allow custom header code, the widget can't run there.

Google Tag Manager

If the client's site already uses Google Tag Manager, you can add fydbek without a developer and without touching the site's code. All you need is access to the GTM container.

  1. In GTM open Tags, click New and choose Custom HTML as the tag type.
  2. Paste the regular install code from the dashboard (Google Tag Manager tab). Don't change anything in it, the data-project attribute must stay.
  3. Choose Initialization - All Pages as the trigger. The tag fires as early as possible and fydbek catches more errors from page load. Plain All Pages works too.
  4. Save, check in Preview that the tag fired, and publish the container.

Things to watch:

Install with an AI agent

Is the site in a repository? Under the install code in the dashboard there is an AI agent tab with a ready prompt for Claude Code, Cursor or Codex. Paste it into the agent opened in the site's project. The agent finds the shared layout, adds the code to <head> unchanged and adds to the CSP only what the widget needs. It does not add 'unsafe-inline'. When done, it tells you which file it changed and whether the site has a CSP. There is a prompt for strict mode too.

Strict mode

Strict mode is for sites that are already live. Visitors download nothing at all from fydbek, not even the loader. Instead of a script link you add a small inline script. It adds the loader only when an invited person arrives: with a code from a fydbek link in the URL (an invite or the Open on site button), with ?fydbek in the URL, with a saved fydbek sign-in, or with the fydbek Chrome extension.

Turn it on with the Strict mode switch in the Installation tab. If you are unsure, leave it off. The regular code doesn't show visitors anything either.

Things to watch:

Content-Security-Policy

If your site sends no CSP, skip this part.

For the regular code, add:

script-src https://cdn.fydbek.com
connect-src https://api.fydbek.com wss://api.fydbek.com

For the strict code, add the hash to script-src as well. The dashboard shows the exact value under the strict code, in the For developers part:

script-src 'sha256-...' https://cdn.fydbek.com
connect-src https://api.fydbek.com wss://api.fydbek.com

The widget does not need 'unsafe-inline' in script-src. It uses no eval and no inline scripts, and it puts its styles into a Shadow DOM via adoptedStyleSheets, which style-src does not cover.

Screenshots are the one exception. Without the extension, the widget renders them from a copy of the page, and that fails under a style-src without 'unsafe-inline'. The feedback is then saved without a screenshot, along with the reason. The fydbek Chrome extension takes an exact screen capture instead. Whether to allow 'unsafe-inline' in style-src is up to the site owner.

Voice comments need the microphone. If your site blocks it in the Permissions-Policy header, the widget hides the microphone button.

How to check it works

  1. Open the site and add ?fydbek to the end of the URL, for example https://client-site.com/?fydbek.
  2. The fydbek toolbar should appear in the bottom right corner. If you are not signed in, you will see just the Sign in to fydbek button.
  3. In the dashboard's Installation tab you can click Verify on site. The dashboard opens the site with ?fydbek and waits for the widget to check in. Then it shows which site the widget runs on and when it was last seen.

With strict mode, check the opposite case too. Without ?fydbek the site looks as before, and the Network tab in developer tools shows no request to cdn.fydbek.com.

The toolbar does not show up

Still stuck? Send your developer the For developers part from the dashboard, or the prompt from the AI agent tab. You can also write to hello@fydbek.com.

Next steps