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โ
- Go to Forms โ Lead Capture Widgets in the sidebar.
- Click New Capture Widget.
- Configure:
| Field | Description |
|---|---|
| Name | Internal name for this widget |
| Form | Select which LeadHub form to display in the widget |
| Trigger Type | Button (floating button) or Inline (embedded in a container) |
| Button Label | Text on the floating button (e.g. "Contact Us") |
| Button Color | Background color of the button |
| Position | Where the floating button appears: bottom-right, bottom-left, etc. |
| Active | Enable or disable the widget |
- Click Save.
Getting the Embed Codeโ
After saving the widget:
- Click Get Code (or the code icon) on the widget row.
- Copy the JavaScript snippet.
- Paste it just before the closing
</body>tag on your website.
Inline Widgetโ
To embed the widget inline (inside a specific div):
- Set Trigger Type to
Inline. - Add a container element to your page with the widget's data attribute:
<div data-leadhub-widget="your-widget-id"></div> - Paste the JavaScript snippet anywhere on the page (before
</body>).
How It Worksโ
- The JS snippet loads asynchronously โ it does not slow down your page.
- When the visitor clicks the button (or the page loads for inline), the form is rendered.
- On submission, the data is sent to your LeadHub installation and a lead record is created.
- 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.