• Home
BuildWithMatija
Get In Touch
  1. Home
  2. Blog
  3. Next.js
  4. Ultimate Fiidbakk Next.js Integration: Quick Setup Guide

Ultimate Fiidbakk Next.js Integration: Quick Setup Guide

Embed Fiidbakk’s feedback widget in Next.js — widget ID, env variable usage, testing steps, and dashboard configuration.

22nd January 2026·Updated on:22nd February 2026·MŽMatija Žiberna·
Next.js
Ultimate Fiidbakk Next.js Integration: Quick Setup Guide

⚡ Next.js Implementation Guides

In-depth Next.js guides covering App Router, RSC, ISR, and deployment. Get code examples, optimization checklists, and prompts to accelerate development.

No spam. Unsubscribe anytime.

Related Posts:

  • •Fix Next.js Prisma Serialization: Centralize Decimal/Date
  • •Next-intl Locale Switch: Preserve Dynamic Route Slugs
  • •Interactive TypeScript Schema Visualizer for Next.js

When you hand off a website to a client for review, you need a way to capture their feedback without asking them to juggle emails, spreadsheets, or separate tools. I recently integrated Fiidbakk into a Next.js project and realized how much friction it removes from the feedback collection process. This guide walks you through the exact technical setup.

The Problem

Traditionally, collecting client feedback requires multiple touchpoints: email exchanges, phone calls, or asking clients to document issues in a shared document. Each method introduces friction and context switching. You need a solution that lives directly on the website, captures feedback in one place, and requires zero effort from the client to use.

Fiidbakk solves this with a lightweight, embeddable widget that appears on your site and feeds feedback into a centralized dashboard.

Getting Your Widget ID

Before you can embed anything, you need a Fiidbakk account and your unique widget ID.

  1. Sign up at fiidbakk.com
  2. Create a new feedback widget from your dashboard
  3. You'll receive a Widget ID that looks like 6918592c8d7731387f43f14c
  4. Save this ID—you'll use it in every implementation

Step 1: Create a Fiidbakk Component

The cleanest approach is to isolate the Fiidbakk logic in its own React component. This keeps your setup modular and makes it easy to enable or disable the widget across your entire application.

Create a new file in your components directory:

// File: src/components/fiidbakk-widget.tsx
"use client";

import { useEffect } from "react";

export function FiidbakkWidget() {
  useEffect(() => {
    // Create feedback widget element
    const widgetEl = document.createElement("feedback-widget");
    widgetEl.setAttribute("widgetid", "6918592c8d7731387f43f14c");

    // Create and configure script
    const scriptEl = document.createElement("script");
    scriptEl.type = "module";
    scriptEl.src = "https://widget.fiidbakk.com/main.js";

    // Append to document
    document.body.appendChild(widgetEl);
    document.body.appendChild(scriptEl);
  }, []);

  return null;
}

The 'use client' directive tells Next.js this component runs in the browser—necessary because we're manipulating the DOM directly. The useEffect hook runs once when the component mounts, creating two elements: the feedback widget itself and the script that powers it.

The widget ID in the setAttribute call is what ties this widget back to your Fiidbakk dashboard. Replace 6918592c8d7731387f43f14c with your actual widget ID.

The component returns null because the Fiidbakk widget renders itself directly to the DOM—there's no JSX output needed.

Step 2: Add the Component to Your Root Layout

For the feedback widget to appear on every page, you need to add it to your root layout file. This ensures the Fiidbakk script loads once and persists across navigation.

Open your main layout file:

// File: src/app/layout.tsx
import type { Metadata } from "next";
import "./globals.css";
import { Navbar } from "@/components/navbar";
import { Footer } from "@/components/footer";
import { FiidbakkWidget } from "@/components/fiidbakk-widget";
import { Analytics } from "@vercel/analytics/next"

export const metadata: Metadata = {
  title: "Your Site Title",
  description: "Your site description",
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="en">
      <body>
        <Navbar />
        {children}
        <Footer />
        <Analytics />
        <FiidbakkWidget />
      </body>
    </html>
  );
}

The key point here is placement. Put <FiidbakkWidget /> after your main content components but alongside other global utilities like <Analytics />. This ensures the widget loads after your page is interactive but doesn't block rendering.

Step 3: Replace Your Widget ID

The example above uses a placeholder widget ID. You must replace it with your actual ID from Fiidbakk:

// In src/components/fiidbakk-widget.tsx
widgetEl.setAttribute("widgetid", "YOUR_ACTUAL_WIDGET_ID_HERE");

Each widget ID corresponds to a specific feedback form in your Fiidbakk dashboard. If you have multiple projects or sites, each will have its own widget ID.

Step 4: Test the Widget

Deploy your changes or run your development server:

npm run dev

Navigate to your site in the browser. You should see a small feedback button (usually in the bottom-right corner by default—this is configurable in Fiidbakk settings). Click it to open the feedback form and verify it's working.

Test by submitting a piece of feedback yourself. Log into your Fiidbakk dashboard and confirm the feedback appears in your inbox. This validates that the widget is properly connected to your account.

Optional: Environment Variables

If you want to avoid hardcoding the widget ID, you can use environment variables:

// File: src/components/fiidbakk-widget.tsx
"use client";

import { useEffect } from "react";

export function FiidbakkWidget() {
  useEffect(() => {
    const widgetId = process.env.NEXT_PUBLIC_FIIDBAKK_WIDGET_ID;

    if (!widgetId) {
      console.warn("Fiidbakk widget ID not configured");
      return;
    }

    const widgetEl = document.createElement("feedback-widget");
    widgetEl.setAttribute("widgetid", widgetId);

    const scriptEl = document.createElement("script");
    scriptEl.type = "module";
    scriptEl.src = "https://widget.fiidbakk.com/main.js";

    document.body.appendChild(widgetEl);
    document.body.appendChild(scriptEl);
  }, []);

  return null;
}

Then add to your .env.local file:

NEXT_PUBLIC_FIIDBAKK_WIDGET_ID=6918592c8d7731387f43f14c

The NEXT_PUBLIC_ prefix tells Next.js to make this variable available in the browser (required since Fiidbakk needs it client-side). Without this prefix, environment variables stay server-only.

Step 5: Configure Widget Behavior (Optional)

Fiidbakk allows customization through your dashboard settings. You can:

  • Change the button position (corner, side, etc.)
  • Customize button appearance and label
  • Set up custom form fields beyond the default feedback text
  • Configure where feedback gets routed

These settings live in your Fiidbakk dashboard and don't require code changes. The widget automatically respects your dashboard configuration once deployed.

Verification Checklist

Before considering the setup complete:

  • Fiidbakk account created and widget ID obtained
  • FiidbakkWidget component created with your widget ID
  • Component imported and added to root layout
  • Development server runs without errors
  • Widget button visible on the site
  • Test feedback submitted and appears in Fiidbakk dashboard
  • Widget persists across page navigation (if using Next.js routing)

That's It

The Fiidbakk widget is now live on your site. Your clients can click the feedback button and submit thoughts, bugs, or suggestions directly to you without leaving the page. All feedback centralizes in your Fiidbakk dashboard instead of scattered across emails.

The setup is intentionally minimal because Fiidbakk handles the heavy lifting. Once the widget is embedded, the rest is configuration through their dashboard—no additional code needed.

Let me know in the comments if you have questions, and subscribe for more practical development guides.

Thanks, Matija

📄View markdown version
0

Frequently Asked Questions

Comments

Leave a Comment

Your email will not be published

Stay updated! Get our weekly digest with the latest learnings on NextJS, React, AI, and web development tips delivered straight to your inbox.

10-2000 characters

• Comments are automatically approved and will appear immediately

• Your name and email will be saved for future comments

• Be respectful and constructive in your feedback

• No spam, self-promotion, or off-topic content

Matija Žiberna
Matija Žiberna
Full-stack developer, co-founder

I'm Matija Žiberna, a self-taught full-stack developer and co-founder passionate about building products, writing clean code, and figuring out how to turn ideas into businesses. I write about web development with Next.js, lessons from entrepreneurship, and the journey of learning by doing. My goal is to provide value through code—whether it's through tools, content, or real-world software.

You might be interested in

Fix Next.js Prisma Serialization: Centralize Decimal/Date
Fix Next.js Prisma Serialization: Centralize Decimal/Date

19th January 2026

Next-intl Locale Switch: Preserve Dynamic Route Slugs
Next-intl Locale Switch: Preserve Dynamic Route Slugs

31st January 2026

Interactive TypeScript Schema Visualizer for Next.js
Interactive TypeScript Schema Visualizer for Next.js

2nd February 2026

Table of Contents

  • The Problem
  • Getting Your Widget ID
  • Step 1: Create a Fiidbakk Component
  • Step 2: Add the Component to Your Root Layout
  • Step 3: Replace Your Widget ID
  • Step 4: Test the Widget
  • Optional: Environment Variables
  • Step 5: Configure Widget Behavior (Optional)
  • Verification Checklist
  • That's It
On this page:
  • The Problem
  • Getting Your Widget ID
  • Step 1: Create a Fiidbakk Component
  • Step 2: Add the Component to Your Root Layout
  • Step 3: Replace Your Widget ID
Build With Matija Logo

Build with Matija

Matija Žiberna

I turn scattered business knowledge into one usable system. End-to-end system architecture, AI integration, and development.

Quick Links

Payload CMS Websites
  • Bespoke AI Applications
  • Projects
  • How I Work
  • Blog
  • Get in Touch

    Have a project in mind? Let's discuss how we can help your business grow.

    Contact me →
    © 2026BuildWithMatija•Principal-led system architecture•All rights reserved