From de8e2b7bcf89de75f21793be8e6d1c303d0da855 Mon Sep 17 00:00:00 2001 From: Louis Facun Date: Fri, 6 Feb 2026 14:01:21 +0800 Subject: [PATCH 1/2] chore: update track lead documentation --- README.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 63612f0..00a314b 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,19 @@ # Leadsources SDK Functions -## `trackLead(data)` +## `trackLead(data, formTitle, formType)` Submit a lead record with custom data. The SDK will automatically include all lead source data and visitor journey data when sending the lead record. Used to send data to your LeadSources dashboard. +**Parameters:** + +- `data` - Object containing lead information (email, name, phone, etc.) +- `formTitle` - String (max 255 characters) identifying the form +- `formType` - String, form builder type. Must be one of: + - `"elementor-forms"` + - `"gravity-forms"` + - `"ninja-forms"` + - `"custom-forms"` + **Example:** ```javascript @@ -12,7 +22,7 @@ window.leadsources.trackLead({ name: "John Doe", phone: "555-1234", // ... any other fields -}); +}, "Contact Us Form", "elementor-forms"); ``` **When to use:** From cd4bc6a78d689dc0211ad1406a02b94ce81a4482 Mon Sep 17 00:00:00 2001 From: Louis Facun Date: Fri, 6 Feb 2026 22:28:02 +0800 Subject: [PATCH 2/2] chore: remove form type --- README.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/README.md b/README.md index 00a314b..8954240 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Leadsources SDK Functions -## `trackLead(data, formTitle, formType)` +## `trackLead(data, formTitle)` Submit a lead record with custom data. The SDK will automatically include all lead source data and visitor journey data when sending the lead record. Used to send data to your LeadSources dashboard. @@ -8,11 +8,6 @@ Submit a lead record with custom data. The SDK will automatically include all le - `data` - Object containing lead information (email, name, phone, etc.) - `formTitle` - String (max 255 characters) identifying the form -- `formType` - String, form builder type. Must be one of: - - `"elementor-forms"` - - `"gravity-forms"` - - `"ninja-forms"` - - `"custom-forms"` **Example:**