Widgets & EmbedsInline Embed

Inline Embed

Render the ProductBridge widget directly inside a container element on your page. Perfect for dedicated feedback pages, help centers, or any place where you want the widget as part of your layout rather than an overlay.

Overview

The inline embed renders the widget inside a <div> you place anywhere on your page. There is no floating button, no overlay — the widget becomes part of your page content. Use it for a dedicated /feedback page, a help center, or a settings panel.

How It Works

  1. Add an empty <div> with a unique ID where you want the widget to appear
  2. Load the SDK and call ProductBridge.embed() (not init()) pointing at that container
  3. The widget renders inside the container at whatever height you specify

Installation

<!-- 1. Place this div where you want the widget to appear -->
<div id="productbridge-embed"></div>

<!-- 2. Paste this script before </body> -->
<script>
  (function () {
    var s = document.createElement('script');
    s.src = 'https://app.productbridge.io/sdk/pb-widget.js';
    s.async = true;
    s.onload = function () {
      ProductBridge.embed({
        organizationId: 'YOUR_ORGANIZATION_ID',
        containerId: 'productbridge-embed', // ID of the div above
        height: '600px',
        theme: 'auto',
        defaultTab: 'feedback',
      });
    };
    document.head.appendChild(s);
  })();
</script>

Configuration Options

OptionTypeDefaultDescription
organizationIdstringRequired. Your organization ID
containerIdstringRequired. ID of the container <div>
heightstring600pxHeight of the embedded widget (any CSS value)
themestringautoauto, light, or dark
defaultTabstringfeedbackfeedback, roadmap, or changelog
userTokenstringJWT for automatic user identification — see Identity Verification

Tips

Set the container's width to 100% and use a fixed height (e.g. 700px) so the widget fills your layout predictably. Avoid height: auto — the widget's internal iframe has a fixed size.

Use ProductBridge.embed()not ProductBridge.init() — for inline embeds. init() creates the floating button; embed() renders into a container.

Identify Your Users

To link feedback to your logged-in users, generate a JWT on your backend and pass it as userToken. See Identity Verification for server-side code in Node.js, Python, PHP, Ruby, and Go.