Skip to content

[AT-176]: Add questionTopic parameter to PIA question tracking events - #475

Merged
Mudaafi merged 2 commits into
Constructor-io:masterfrom
dmitrycnstrc:AT-176/js-client-add-question_topic-to-pia-tracking-events
Jul 21, 2026
Merged

[AT-176]: Add questionTopic parameter to PIA question tracking events#475
Mudaafi merged 2 commits into
Constructor-io:masterfrom
dmitrycnstrc:AT-176/js-client-add-question_topic-to-pia-tracking-events

Conversation

@dmitrycnstrc

Copy link
Copy Markdown
Contributor

@dmitrycnstrc
dmitrycnstrc marked this pull request as ready for review July 21, 2026 11:59
@dmitrycnstrc
dmitrycnstrc requested a review from a team as a code owner July 21, 2026 11:59
Copilot AI review requested due to automatic review settings July 21, 2026 11:59

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.

Pull request overview

Adds support for an optional questionTopic field to Product Insights Agent (PIA) question tracking events so callers can associate question click/submit events with a topic/category.

Changes:

  • Extend trackProductInsightsAgentQuestionClick and trackProductInsightsAgentQuestionSubmit to accept questionTopic and send it as question_topic in the request body.
  • Update TypeScript definitions for both methods to include questionTopic?: string.
  • Add/extend spec assertions to verify question_topic is sent when questionTopic is provided.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
src/types/tracker.d.ts Adds questionTopic?: string to the parameter types for the two PIA question tracking methods.
src/modules/tracker.js Accepts questionTopic and maps it to bodyParams.question_topic for click/submit events.
spec/src/modules/tracker.js Adds coverage asserting question_topic is present in the request body when provided.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Mudaafi Mudaafi self-assigned this Jul 21, 2026

@Mudaafi Mudaafi 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.

tests pass

@Mudaafi
Mudaafi merged commit 2c052b5 into Constructor-io:master Jul 21, 2026
9 of 12 checks passed
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.

3 participants