Skip to main content

Lead Form Widget

Lead Form Widget

Embed a lead capture form on your website to collect visitor information and create leads in Funnel Leasing

Overview

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.

Prerequisites

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
๐Ÿ’ก
Contact your Funnel Leasing account representative or support team at support@funnelleasing.com to obtain your API key and Group ID.

Installation

To embed the Lead Form widget on your website, add the following code to your HTML page where you want the widget to appear:

Installation codeHTML200 ยท application/json
<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>
๐Ÿ“
Replace 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).

Configuration

The Lead Form widget accepts the following configuration parameters:

ParameterTypeRequiredDefaultDescription
keystringYesโ€”The company API key provided by Funnel Leasing
groupnumberYesโ€”The ID of the Funnel group that will receive the leads. This group determines which users are assigned the lead
typestringYesโ€”Must be set to "lead_capture" for the lead form widget
containerIdstringNoโ€”The ID of the div where you want your widget to appear. If not specified, the widget will create its own container
colorstringNoโ€”The brand color (6-digit hex code) used for submit buttons and header text
locationstringNoโ€”A custom location (such as a Building or specific Unit) to apply to the lead. Any location passed is saved on the client
campaignInfostringNoโ€”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
onCompletefunctionNoโ€”A callback function that executes after the widget form is submitted. Useful for triggering analytics events (e.g., Google Tag Manager)
submitLabelstringNo"Request Information"Label that displays on the submit button on the client info form
unitnumberNoโ€”ID of Funnel Unit that the client will be associated with in Funnel
buttonTextColorstringNoโ€”Color of the text on the submit button (6-digit hex code)
textColorstringNoโ€”Color of the headers for each field on the widget (6-digit hex code)

Examples

Basic Lead Form

A minimal lead form with only required parameters:

Basic implementationHTML200 ยท application/json
<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:

Customized stylingHTML200 ยท application/json
<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:

Google Tag Manager integrationHTML200 ยท application/json
<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>
๐Ÿ’ก
For detailed instructions on integrating with Google Tag Manager, see the Google Analytics Integration guide.

Lead Form with Specific Container

A lead form that targets a specific div on your page:

Custom containerHTML200 ยท application/json
<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>

Widget Code Generator

Use the code generator below to create custom widget code with your specific configuration:

Widget Code Generator

Widget Demo

See the Lead Form widget in action:

Marketing Attribution

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 campaignInfo parameter - When not using the DNI script, you can manually pass campaign information using the campaignInfo parameter. The value must match exactly (case sensitive) the campaign name as entered in Funnel under marketing settings.
โš ๏ธ
Do not use both the DNI script and the campaignInfo parameter together. If both are present, the campaignInfo parameter will overwrite the lead source passed by the DNI script.

Troubleshooting

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

ErrorSolution
API key is invalidContact Funnel Leasing support to verify your API key
Group ID not foundVerify the Group ID exists in your Funnel account
Widget not loadingCheck that the script source URL is accessible and not blocked by ad blockers

Support

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