Last updated

captureLead()

Captures a lead programmatically and associates them with the current affiliate attribution.

Signature

await window.FairShareSDK.captureLead(leadData);

Parameters

ParameterTypeDescription
leadDataobjectLead information

LeadData Object:

PropertyTypeRequiredDescription
emailstringYesLead's email address
namestringNoLead's full name
phonestringNoLead's phone number

Returns

Promise<Lead> — The created lead object.

Example

// Capture a lead programmatically
await window.FairShareSDK.captureLead({
  email: "customer@example.com",
  name: "John Doe",
  phone: "+1234567890"
});

Minimal Lead Capture

// Email only
await window.FairShareSDK.captureLead({
  email: "customer@example.com"
});