-
Notifications
You must be signed in to change notification settings - Fork 0
chore: update track lead documentation #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughREADME.md updated to reflect an expanded public API: Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes bzzz 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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.
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.
There was a problem hiding this 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`.
4a9d049 to
cd4bc6a
Compare
Summary by CodeRabbit