Skip to content

Conversation

@louisfacun
Copy link
Member

@louisfacun louisfacun commented Feb 6, 2026

Summary by CodeRabbit

  • Documentation
    • Updated trackLead documentation to add an optional formTitle parameter and show its type/limits. Examples now demonstrate passing the form title alongside lead data, enabling callers to provide the form’s title for richer lead context and clearer tracking.

@coderabbitai
Copy link

coderabbitai bot commented Feb 6, 2026

Walkthrough

README.md updated to reflect an expanded public API: trackLead(data)trackLead(data, formTitle). Documentation now describes the new formTitle parameter (type and limits) and shows updated example usage. beep boop

Changes

Cohort / File(s) Summary
Documentation
README.md
Updated public API docs: changed trackLead(data) signature to trackLead(data, formTitle). Added formTitle parameter description (type/limits) and updated example usage accordingly.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

bzzz

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: updating documentation for the trackLead function to reflect the new formTitle parameter.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/update-track-lead-function

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

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`.

@louisfacun louisfacun requested a review from f-tepel February 12, 2026 10:12
@louisfacun louisfacun force-pushed the chore/update-track-lead-function branch from 4a9d049 to cd4bc6a Compare February 12, 2026 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant