Lead Form Widget
Lead Form Widget
Embed a lead capture form on your website to collect visitor information and create leads in Funnel Leasing
The Lead Form widget displays a customizable form that visitors can fill out to submit their contact information. When submitted, the form creates a lead in Funnel Leasing and assigns it to the specified group.
Before embedding the Lead Form widget, ensure you have:
- Funnel Leasing API Key - Your company API key (provided by Funnel Leasing)
- Group ID - The ID of the Funnel group that will receive the leads
- Website access - Ability to add script tags to your website's HTML
To embed the Lead Form widget on your website, add the following code to your HTML page where you want the widget to appear:
<script src="https://integrations.nestio.com/contact-widget/v1/integration.js" id="nestio-lead-capture-frame"></script><script type="text/javascript"> NestioLeadCapture({ "type": "lead_capture", "key": "FUNNEL_API_KEY_HERE", "group": FUNNEL_GROUP_ID_HERE, "color": "", "location": "", onComplete: function() { dataLayer.push({'event': 'lead-form-submission'}); } });</script>FUNNEL_API_KEY_HERE with your actual API key (as a string) and FUNNEL_GROUP_ID_HERE with your Group ID (as a number without quotes).The Lead Form widget accepts the following configuration parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
key | string | Yes | โ | The company API key provided by Funnel Leasing |
group | number | Yes | โ | The ID of the Funnel group that will receive the leads. This group determines which users are assigned the lead |
type | string | Yes | โ | Must be set to "lead_capture" for the lead form widget |
containerId | string | No | โ | The ID of the div where you want your widget to appear. If not specified, the widget will create its own container |
color | string | No | โ | The brand color (6-digit hex code) used for submit buttons and header text |
location | string | No | โ | A custom location (such as a Building or specific Unit) to apply to the lead. Any location passed is saved on the client |
campaignInfo | string | No | โ | When not using Funnel's DNI Script, use this parameter to pass a value to Funnel for marketing attribution. The value must match exactly (case sensitive) the campaign name as entered in Funnel under marketing settings. When using the DNI Script, this parameter should not be used as it will overwrite the lead source |
onComplete | function | No | โ | A callback function that executes after the widget form is submitted. Useful for triggering analytics events (e.g., Google Tag Manager) |
submitLabel | string | No | "Request Information" | Label that displays on the submit button on the client info form |
unit | number | No | โ | ID of Funnel Unit that the client will be associated with in Funnel |
buttonTextColor | string | No | โ | Color of the text on the submit button (6-digit hex code) |
textColor | string | No | โ | Color of the headers for each field on the widget (6-digit hex code) |
Basic Lead Form
A minimal lead form with only required parameters:
<script src="https://integrations.nestio.com/contact-widget/v1/integration.js" id="nestio-lead-capture-frame"></script><script type="text/javascript"> NestioLeadCapture({ "type": "lead_capture", "key": "your-api-key-here", "group": 123 });</script>Customized Lead Form
A lead form with custom styling and location:
<script src="https://integrations.nestio.com/contact-widget/v1/integration.js" id="nestio-lead-capture-frame"></script><script type="text/javascript"> NestioLeadCapture({ "type": "lead_capture", "key": "your-api-key-here", "group": 123, "color": "74FFE7", "location": "123 First Street, New York, NY 10001", "submitLabel": "Get More Information", "buttonTextColor": "FFFFFF", "textColor": "333333" });</script>Lead Form with Google Tag Manager Integration
A lead form that triggers a Google Tag Manager event on submission:
<script src="https://integrations.nestio.com/contact-widget/v1/integration.js" id="nestio-lead-capture-frame"></script><script type="text/javascript"> NestioLeadCapture({ "type": "lead_capture", "key": "your-api-key-here", "group": 123, "color": "74FFE7", "location": "123 First Street", onComplete: function() { dataLayer.push({'event': 'lead-form-submission'}); } });</script>Lead Form with Specific Container
A lead form that targets a specific div on your page:
<div id="my-lead-form"></div>
<script src="https://integrations.nestio.com/contact-widget/v1/integration.js" id="nestio-lead-capture-frame"></script><script type="text/javascript"> NestioLeadCapture({ "type": "lead_capture", "key": "your-api-key-here", "group": 123, "containerId": "my-lead-form" });</script>Use the code generator below to create custom widget code with your specific configuration:
Widget Code Generator
See the Lead Form widget in action:
The Lead Form widget supports marketing attribution in two ways:
- Using the DNI Script (Recommended) - When using Funnel's Dynamic Number Insertion (DNI) script, marketing attribution is automatically handled. The DNI script captures UTM parameters and referrer information, which is then passed to the lead form widget.
- Using the
campaignInfoparameter - When not using the DNI script, you can manually pass campaign information using thecampaignInfoparameter. The value must match exactly (case sensitive) the campaign name as entered in Funnel under marketing settings.
campaignInfo parameter together. If both are present, the campaignInfo parameter will overwrite the lead source passed by the DNI script.Widget Not Appearing
- Check script tags - Ensure both script tags are present and in the correct order
- Verify API key - Confirm your API key is correct and wrapped in quotes
- Check Group ID - Verify your Group ID is a number (without quotes)
- Browser console - Check the browser console for JavaScript errors
Leads Not Being Created
- Verify Group ID - Ensure the Group ID exists in your Funnel Leasing account
- Check API key - Confirm your API key has the necessary permissions
- Network tab - Check the browser's Network tab to see if requests are being sent successfully
Styling Issues
- Color format - Ensure color values are 6-digit hex codes (e.g.,
"74FFE7", not"#74FFE7"or"74FFE7FF") - Container conflicts - If using
containerId, ensure the target div exists on the page
Common Errors
| Error | Solution |
|---|---|
| API key is invalid | Contact Funnel Leasing support to verify your API key |
| Group ID not found | Verify the Group ID exists in your Funnel account |
| Widget not loading | Check that the script source URL is accessible and not blocked by ad blockers |
If you continue to experience issues after checking the troubleshooting steps above, please contact:
- Customer Support: support@funnelleasing.com
- Your Account Representative: Reach out to your assigned Funnel Leasing account representative