-
Notifications
You must be signed in to change notification settings - Fork 11
[NO-REF] - add quiz trigger tracker events #412
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
[NO-REF] - add quiz trigger tracker events #412
Conversation
PR Review: Add Quiz Trigger Tracker EventsThank you for this contribution! I've reviewed the changes and have several findings to share: 🐛 Critical Bugs1. Logic Error in
|
Code Review: PR #412 - Add Quiz Trigger Tracker EventsThank you for this contribution! This PR adds two new tracker methods for quiz triggers. The test coverage is comprehensive (44 test cases added), and the code follows many existing patterns well. However, I've identified several critical bugs that need to be addressed before merging. 🚨 Critical Issues (Must Fix)1. Logic Error in
|
src/modules/tracker.js
Outdated
| return new Error('"searchQuery" is a required parameter of type string'); | ||
| } | ||
|
|
||
| if (typeof matchedFacet !== 'string' || typeof matchedQuery !== 'string') { |
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.
Should this be && instead of || like the one above?
src/modules/tracker.js
Outdated
| * quizId: 'coffee-quiz', | ||
| * matchedFacet: 'coffee_facet', | ||
| * searchQuery: 'coff', | ||
| * url: 'www.example.com', |
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.
Is URL a supported parameter here?
src/modules/tracker.js
Outdated
| * quizId: 'coffee-quiz', | ||
| * matchedFacet: 'coffee_facet', | ||
| * searchQuery: 'coff', | ||
| * url: 'www.example.com', |
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.
Is URL a supported parameter here?
src/modules/tracker.js
Outdated
| * @param {object} [networkParameters] - Parameters relevant to the network request | ||
| * @param {number} [networkParameters.timeout] - Request timeout (in milliseconds) | ||
| * @returns {(true|Error)} | ||
| * @description User typed a search query and it caused a quiz trigger to pop up |
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.
This needs a change
No description provided.