1. Home
  2. Docs
  3. Admin Settings
  4. Getting leads into Lead Assign
  5. Lead input widget

Lead input widget

Lead Assign has a widget which you can embed in a webpage in order to add leads directly to your Lead Assign account.

Setup

Setting up the widget requires two access tokens, a company slug and an API key. The company slug indicates the company that you want to send leads into, you can see your company slug in the url after you login to Lead Assign.

Your API key can be obtained by visiting https://app.leadassign.com/YOUR_COMPANY_SLUG/apikey/. Press the ‘Generate new auth token’ button to generate a new API key. Then add the following code to the webpage from which you wish to add leads:

<script>
la_endpoint = ‘https://app.leadassign.com/’;
la_token = ‘YOUR_API_KEY_HERE’;
la_company = ‘YOUR_COMPANY_SLUG’;
</script>
<script src=’https://app.leadassign.com/js/form-widget.js’></script>

Set the la_token field to the API key you generated above. Set the la_company field to your companies slug.

This will inject a button into your page. Clicking the ‘Create a new lead’ button will open a modal containing a form. After filling out the form, click the ‘Create a new lead button.’ If the lead was created successfully, a pop up with the message ‘Request sent’ will appear. If the lead was not created successfully ‘Please try again’ will be on a similar pop up.

Configuration options

The plugin comes with various configuration options:

  • Adding a div with ID “la_widget_form” appends the form directly to your page as opposed to using a popup modal
  • Creating a variable called la_geolocation and setting its value to true adds an address field to the form
  • Creating a variable called la_source and setting its value to true adds a source email field to the form
  • Creating a variable called la_first and setting its value to true adds a first agent field to the form
  • All of the labels for the fields on the form can be customized. Setting any of the following to a string of your choice will change the label on the corresponding field to the string provided:
    • la_name_custom
    • la_phone_custom
    • la_email_custom
    • la_text_custom
    • la_geolocation_custom
    • la_source_custom
    • la_first_custom
Was this article helpful to you? Yes No

How can we help?