Iframe embed

Use the iframe embed when you want the full public UserJot experience inside your own page instead of the floating widget launcher.

This is the better fit when you want:

  • a full feedback portal inside your app
  • roadmap or updates embedded on a dedicated page
  • your own surrounding navigation and layout

Before you start

The embed works through the browser SDK, so load the SDK and call init(...) first.

Unlike the floating widget, the embed needs a real container with an explicit height. The iframe fills that container.

<div
  data-userjot-embed
  style="width: 100%; min-height: 720px;"
></div>

Basic setup

Initialize the SDK, then create the embed inside onReady:

<script>window.$ujq=window.$ujq||[];window.uj=window.uj||new Proxy({},{get:(_,p)=>(...a)=>window.$ujq.push([p,...a])});document.head.appendChild(Object.assign(document.createElement('script'),{src:'https://cdn.userjot.com/sdk/v2/uj.js',type:'module',async:!0}));</script>
<script>
  window.uj.init('YOUR_PROJECT_ID', {
    onReady: () => {
      window.uj.embed();
    }
  });
</script>

Calling embed() before initialization finishes can fail, so onReady is the safe default.

Embed options

const embed = window.uj.embed({
  container: '#feedback-embed',
  path: '/roadmap',
  theme: 'light',
  basePath: '/feedback',
  onReady: () => {
    console.log('Embed ready');
  },
  onError: (error) => {
    console.error('Embed failed:', error.message);
  }
});

Options

  • container: CSS selector or HTMLElement. Defaults to [data-userjot-embed].
  • path: initial path inside the public UserJot site. Defaults to /.
  • theme: 'auto', 'light', or 'dark'.
  • basePath: enables URL syncing between your site URL and the embedded navigation.
  • onReady: runs when the iframe signals that it is ready.
  • onError: runs if the embed cannot be created.

Programmatic control

embed() returns a controller:

const embed = window.uj.embed();
 
embed?.navigate('/updates');
embed?.navigate('/roadmap');
embed?.destroy();

You can also tear down the current embed globally:

window.uj.destroyEmbed();

URL syncing

If you set basePath, the parent page URL stays in sync with navigation inside the embed.

window.uj.embed({
  basePath: '/feedback'
});

Examples:

  • /feedback
  • /feedback/roadmap
  • /feedback/updates

Your app or site must serve the same embed page for requests under that path. For example, if you choose /feedback, your router should send /feedback/* to the page that contains the embed.

Identification and authentication

The embed works with identify(...), just like the widget:

window.uj.init('YOUR_PROJECT_ID', {
  onReady: () => {
    window.uj.identify({
      id: 'user_123',
      email: 'john@example.com'
    });
 
    window.uj.embed();
  }
});

If the user logs in later, you can identify them after the embed already exists:

window.uj.identify({
  id: 'user_123',
  email: 'john@example.com',
  signature: 'SERVER_GENERATED_SIGNATURE'
});

That lets the embed pick up the authenticated state without recreating it.

When to use embed vs widget

  • Use the widget when you want a lightweight launcher on every page.
  • Use the iframe embed when you want a dedicated full-page portal inside your own layout.

If you only need links to your public board, roadmap, or updates pages, use /support/share-your-board instead.