[NO-REF] - add quiz trigger tracker events#412
[NO-REF] - add quiz trigger tracker events#412vladconstructor wants to merge 4 commits intoConstructor-io:masterfrom
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.
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.
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.
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 |
No description provided.