Skip to content
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

v1.29.4 #1107

Merged
merged 2 commits into from
Oct 25, 2022
Merged

v1.29.4 #1107

merged 2 commits into from
Oct 25, 2022

Conversation

nmanu1
Copy link
Contributor

@nmanu1 nmanu1 commented Oct 25, 2022

Bug Fixes

nmanu1 and others added 2 commits October 25, 2022 12:41
Update the direct answer card component to correctly pass the `searcher` as part of analytics events.

Like in the SDK, for RTF and thumbs feedback analytics events, the `searcher` was passed correctly because the options for those analytics events are set from `onMount`, at which point the `searcher` has been set in state. But, for other analytics events like CTA clicks that used `addDefaultEventOptions` to set the options, the `searcher` is not necessarily set in state before the options for those events are calculated. In these cases, `this.getState('searcher')` returned `undefined`, so clicking on a CTA would hit the analytics endpoint without the required `searcher` data and get an error in the response. Using `this._config.data.searcher` directly fixes this issue. Since this data is available in the config, I updated all references to `searcher` and removed it from state so there is no ambiguity in how the information is being set/updated.

See [this Slack thread](https://yext.slack.com/archives/C016ZKY42CF/p1666202290083719) where the issue was raised for more context.

J=TECHOPS-7011
TEST=manual

Spin up the test-site and test on both universal and vertical pages. See that without this change, CTA clicks would result in a bad request to the analytics endpoint with the error `Record missing required field: searcher`. With this change, the correct value for `searcher` was sent in the request. Thumbs feedback and RTF analytics requests continued to pass the `searcher` correctly.
*An automated PR which updates the version number in package.json and package-lock.json files*
@coveralls
Copy link

Coverage Status

Coverage remained the same at 8.75% when pulling aaad24e on hotfix/v1.29.4 into b01f0be on master.

@nmanu1 nmanu1 requested a review from a team October 25, 2022 19:01
@nmanu1 nmanu1 merged commit 223c682 into master Oct 25, 2022
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.

None yet

3 participants