Installing the Widget

How to embed the LeadFloAgent chat widget on your real estate website.

Installing the Widget

The LeadFloAgent chat widget is a small JavaScript snippet you embed on your website. Once added, it loads the chat interface automatically for every visitor. Installation takes under five minutes on most platforms.

Finding Your Embed Snippet

In your dashboard, navigate to your website, then go to Appearance → Embed Code. Your unique snippet looks like this:

<script src="https://leadfloagent.com/widget.js?key=YOUR_WIDGET_KEY" defer></script>

The key parameter identifies your account. Keep it confidential and restrict it to your domain via Settings → Allowed Domains.


Platform-Specific Instructions

WordPress

WordPress powers the majority of real estate brokerage websites.

Recommended method — plugin:

  1. Install the free "Insert Headers and Footers" plugin from the WordPress plugin directory.
  2. Go to Settings → Insert Headers and Footers.
  3. Paste your snippet into the Scripts in Footer field.
  4. Save changes.

Manual method — theme editor:

  1. Go to Appearance → Theme Editor → footer.php.
  2. Paste the snippet immediately before the closing </body> tag.
  3. Save the file.

Note: Manual edits to theme files are overwritten when the theme updates. The plugin method is safer for long-term maintenance.

Squarespace

  1. Go to Settings → Advanced → Code Injection.
  2. Paste your snippet into the Footer field.
  3. Save.

The widget will appear on all pages site-wide.

Wix

  1. In the Wix Editor, go to Settings → Custom Code.
  2. Click + Add Custom Code.
  3. Paste your snippet, set placement to Body - end, and select All Pages.
  4. Apply and publish your site.

Webflow

  1. In the Webflow Designer, open Project Settings → Custom Code.
  2. Paste your snippet into the Footer Code field.
  3. Save and publish.

IDX Broker and Custom HTML Sites

If your site is built on IDX Broker, a custom HTML template, or any platform that gives you access to raw HTML:

Paste your snippet before the closing </body> tag in your site's main template or layout file. If your IDX platform has a "footer code" or "custom scripts" field in its settings panel, that is the right place.

Next.js (App Router)

For Next.js sites, use the built-in Script component to load the widget correctly:

// src/app/layout.tsx
import Script from "next/script";

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <body>
        {children}
        <Script
          src="https://leadfloagent.com/widget.js?key=YOUR_WIDGET_KEY"
          strategy="afterInteractive"
        />
      </body>
    </html>
  );
}

Real Estate Lead Form Fields

The widget is pre-configured for real estate. When a visitor is ready to submit their contact information, the lead form includes:

FieldRequiredNotes
NameYesFirst and last name
EmailYesUsed for lead notifications
PhoneNoDisplayed in lead details
IntentNoBuy / Sell / Rent — selected by visitor
Time FrameNoShown after Intent is selected

These fields appear automatically. No additional configuration is needed.


Verifying the Widget is Working

After installing the snippet, open your website in a new browser tab (or an incognito window) and look for the chat bubble in the bottom-right corner of the page. Click it and send a message to confirm the widget is active and connected to your account.

If the widget does not appear, verify that:

  • The snippet is placed before </body> (not in the <head>)
  • Your widget key matches what is shown in your dashboard
  • The domain is listed under Settings → Allowed Domains (if you have domain restrictions enabled)

Content Security Policy (CSP)

If your website uses CSP headers, add the following directives to allow the widget to load:

script-src: https://leadfloagent.com
connect-src: https://leadfloagent.com