Skip to main content

Lead Capture Widget

The Lead Capture Widget lets you embed a floating popup or inline form on any external website. Visitors can submit their details without leaving the page.


What is a Capture Widget?โ€‹

A capture widget is a small JavaScript snippet you add to your website. It renders as:

  • A floating button (e.g. bottom-right corner) that opens a form popup when clicked, or
  • An inline embed placed directly inside a page element

When a visitor submits the widget form, a lead is created in your LeadHub workspace.


Creating a Capture Widgetโ€‹

  1. Go to Forms โ†’ Lead Capture Widgets in the sidebar.
  2. Click New Capture Widget.
  3. Configure:
FieldDescription
NameInternal name for this widget
FormSelect which LeadHub form to display in the widget
Trigger TypeButton (floating button) or Inline (embedded in a container)
Button LabelText on the floating button (e.g. "Contact Us")
Button ColorBackground color of the button
PositionWhere the floating button appears: bottom-right, bottom-left, etc.
ActiveEnable or disable the widget
  1. Click Save.

Getting the Embed Codeโ€‹

After saving the widget:

  1. Click Get Code (or the code icon) on the widget row.
  2. Copy the JavaScript snippet.
  3. Paste it just before the closing </body> tag on your website.

Inline Widgetโ€‹

To embed the widget inline (inside a specific div):

  1. Set Trigger Type to Inline.
  2. Add a container element to your page with the widget's data attribute:
    <div data-leadhub-widget="your-widget-id"></div>
  3. Paste the JavaScript snippet anywhere on the page (before </body>).

How It Worksโ€‹

  1. The JS snippet loads asynchronously โ€” it does not slow down your page.
  2. When the visitor clicks the button (or the page loads for inline), the form is rendered.
  3. On submission, the data is sent to your LeadHub installation and a lead record is created.
  4. The form shows the configured thank-you message.

Multiple Widgetsโ€‹

You can have multiple widgets โ€” one per website, product, or use case. Each widget points to a specific form. This lets you track which website or page generated each lead via the form association.


Tipsโ€‹

  • Use a floating button widget on your main website for general inquiries.
  • Use inline widgets on landing pages for targeted campaigns.
  • Combine with the "Form Submitted" automation trigger to immediately assign and follow up.