Conversation
WalkthroughREADME.md updated: Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes bzzz 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In `@README.md`:
- Line 5: Update the opening description sentence that starts "Submit a lead
record with custom data..." to briefly mention the new form identification
parameters by name; explicitly note that the SDK also accepts formTitle and
formType to identify the submitting form (in addition to lead source and visitor
journey data) so readers see these parameters up front before the Parameters
section.
- Around line 11-16: Update the README entry for the form schema to document
validation and error handling for the formType and formTitle fields: state that
formType must be one of "elementor-forms", "gravity-forms", "ninja-forms", or
"custom-forms" and describe the behavior when an invalid value is provided
(e.g., request rejected with a validation error/HTTP 400 or a thrown
ValidationError with a clear message referencing formType), and state that
formTitle is limited to 255 characters and that exceeding this limit results in
a validation error/HTTP 400 (include the exact error messages or error object
shape your API/library returns so consumers know how to detect these cases).
- Around line 9-16: Update the README entry for the trackLead API to state
explicitly whether the parameters are required or optional: annotate `formTitle`
and `formType` (and `data` if needed) as "required" or "optional", and if
optional, document the default behavior when omitted (e.g., default formType
value or treatment in trackLead). Reference the `trackLead` function and the
parameter names `data`, `formTitle`, and `formType` so callers know if this is a
breaking change and how the SDK behaves when those args are not provided.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@README.md`:
- Around line 9-10: Update the parameters section to document the missing third
parameter `formType` (e.g., string like "elementor-forms"), and mark each
parameter as required or optional; specifically, add a line describing
`formType` (type, allowed values if any, and purpose) alongside the existing
`data` and `formTitle` entries and annotate all three with "(required)" or
"(optional)" to match the example call that passes three arguments.
- Line 3: Update the trackLead documentation and signature to include the third
parameter formType so it matches the example usage; modify the signature line
showing `trackLead(data, formTitle)` to `trackLead(data, formTitle, formType)`
and add/update the Parameters section to document the new `formType` parameter
(describe expected values like "elementor-forms" or other form source
identifiers), ensuring the example invocation and parameter docs are consistent
with the function name `trackLead`.
4a9d049 to
cd4bc6a
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@README.md`:
- 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.
| ## `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. |
There was a problem hiding this comment.
🧹 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.
Summary by CodeRabbit