Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# Leadsources SDK Functions

## `trackLead(data)`
## `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.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Consider mentioning the formTitle parameter in the description. bzzz

The past review comment suggesting to update the description to mention the new formTitle parameter is still valid. The description currently focuses only on "custom data" but doesn't indicate that the function now also accepts form identification information. beep

While users can find this in the Parameters section, the description would be more complete if it briefly mentioned that the function accepts a form title for identification purposes.

🤖 Prompt for AI Agents
In `@README.md` at line 5, Update the description for "Submit a lead record" to
explicitly mention the new formTitle parameter: state that in addition to custom
data and visitor/lead source data the SDK accepts a formTitle (a human-readable
identifier for the form) to help identify the submission; reference the
submit-a-lead-record functionality and the formTitle parameter so users see
at-a-glance that form identification is supported.


**Parameters:**

- `data` - Object containing lead information (email, name, phone, etc.)
- `formTitle` - String (max 255 characters) identifying the form

**Example:**

```javascript
Expand All @@ -12,7 +17,7 @@ window.leadsources.trackLead({
name: "John Doe",
phone: "555-1234",
// ... any other fields
});
}, "Contact Us Form");
```

**When to use:**
Expand Down