Lead Capture
The Lead Capture section provides tools for capturing customer leads and associating them with affiliate attribution.
What's Included
| Item | Type | Description |
|---|---|---|
| captureLead | Function | Capture leads programmatically |
<fluid-lead-capture-widget> | Component | Lead capture form widget |
| Chat Settings API | API | Configure widget settings |
Benefits
- Affiliate Attribution — Leads are automatically associated with the current affiliate
- Flexible Contact — Support for email or phone as primary contact method
- Customizable Widget — Position, styling, and messaging options
- Programmatic Control — Capture leads from custom forms or flows
Quick Example
// Capture a lead programmatically await window.FairShareSDK.captureLead({ message: "I'm interested in learning more", contact: { name: "John Doe", email: "john@example.com", phone: "+1 (800) 555-1234" } });
<fluid-lead-capture-widget>
A customizable lead capture form widget.
Usage
<fluid-lead-capture-widget title="Have a question?" description="We'd love to get in touch!" submit-button-text="Send Message" success-message="Thank you! We'll get back to you soon." contact-method="email" position="bottom_right" size="60" ></fluid-lead-capture-widget>
Attributes
| Attribute | Type | Description |
|---|---|---|
primary-color | string | Primary color (hex) |
secondary-color | string | Secondary color (hex) |
title | string | Widget title |
description | string | Widget description |
submit-button-text | string | Submit button text |
success-message | string | Message shown after submission |
on-submit | string | Custom submit handler |
hide-widget | boolean | Show/hide widget |
position | string | Position (e.g., "bottom_right") |
size | number | Widget size |
z-index | number | CSS z-index |
x-margin | number | Horizontal margin |
y-margin | number | Vertical margin |
logo-src | string | Logo image URL |
logo-alt | string | Logo alt text |
footer-text | string | Footer text |
terms-url | string | Terms & conditions URL |
contact-method | string | "email" or "phone" |
attract-bubble-show-delay | number | Delay before showing bubble (ms) |
attract-bubble-hide-delay | number | Delay before hiding bubble (ms) |
Chat Settings API
Configure the lead capture widget programmatically.
// Set settings window.FairShareSDK.chat.settings.set({ title: "Contact Us", description: "We're here to help!", contactMethod: "email" }); // Get current settings window.FairShareSDK.chat.settings.get(); // Clear settings window.FairShareSDK.chat.settings.clear();
Shorthand Alternatives
window.FairShareSDK.setChatSettings({ ... }); window.FairShareSDK.getChatSettings(); window.FairShareSDK.clearChatSettings();
Related
- captureLead — Capture leads programmatically
- Attribution — Attribution settings