Skip to content

Add source parameter to ASA submit tracking - #485

Open
dmitrycnstrc wants to merge 1 commit into
Constructor-io:masterfrom
dmitrycnstrc:AT-216/add-tracking-for-pre-gen-click-on-asa-ui-library-and-document
Open

Add source parameter to ASA submit tracking#485
dmitrycnstrc wants to merge 1 commit into
Constructor-io:masterfrom
dmitrycnstrc:AT-216/add-tracking-for-pre-gen-click-on-asa-ui-library-and-document

Conversation

@dmitrycnstrc

Copy link
Copy Markdown
Contributor

No description provided.

@dmitrycnstrc
dmitrycnstrc marked this pull request as ready for review September 3, 2026 09:52
@dmitrycnstrc
dmitrycnstrc requested a review from a team as a code owner September 3, 2026 09:52
Copilot AI lite review requested due to automatic review settings September 3, 2026 09:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The change is small, type definitions and documentation are updated, and tests verify the new request parameter is sent correctly.

Pull request overview

Adds support for an optional source field on the ASA “submit” tracking event so clients can indicate how an intent submission occurred (e.g., from a suggested question), and ensures the parameter is sent through to the request payload and covered by tests.

Changes:

  • Extend trackAgentSubmit parameters to accept optional source and include it in the POST body when provided.
  • Update JSDoc and TypeScript declarations to reflect the new optional parameter.
  • Update unit tests to validate source is included in the request.
File summaries
File Description
src/types/tracker.d.ts Adds source?: string to the trackAgentSubmit type signature.
src/modules/tracker.js Documents source and conditionally appends it to bodyParams for the submit tracking request.
spec/src/modules/tracker.js Extends the trackAgentSubmit test to include source and asserts it’s present in the request body.
Review details
  • Files reviewed: 2/3 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

2 participants