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

[Einstein analytics] Track the no-search-results scenario properly (@W-15153723@) #1702

Merged
merged 3 commits into from
Mar 20, 2024

Conversation

vmarta
Copy link
Contributor

@vmarta vmarta commented Mar 20, 2024

In the case of no-search-results, it was initially sending the wrong data to Einstein. The viewSearch event should contain empty products=[] and showProducts=false.

Types of Changes

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Documentation update
  • Breaking change (could cause existing functionality to not work as expected)
  • Other changes (non-breaking changes that does not fit any of the above)

Breaking changes include:

  • Removing a public function or component or prop
  • Adding a required argument to a function
  • Changing the data type of a function parameter or return value
  • Adding a new peer dependency to package.json

Changes

  • (change1)

How to Test-Drive This PR

  1. Visit https://localhost:3000/global/en-GB/search?q=sdafdsaf
  2. As expected, there is no search result for the keyword "sdafdsaf"
  3. In the Network tab, inspect the viewSearch request. It should return 200 status code.

(FYI initially we saw 400 error, with the message "Must provide a products array")

Checklists

General

  • Changes are covered by test cases
  • CHANGELOG.md updated with a short description of changes (not required for documentation updates)

Accessibility Compliance

You must check off all items in one of the follow two lists:

  • There are no changes to UI

or...

Localization

  • Changes include a UI text update in the Retail React App (which requires translation)

@vmarta vmarta marked this pull request as ready for review March 20, 2024 18:30
@vmarta vmarta requested a review from a team as a code owner March 20, 2024 18:30
Copy link
Contributor

@vcua-mobify vcua-mobify left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this @vmarta

@vmarta vmarta merged commit 8dd646f into develop Mar 20, 2024
28 checks passed
@vmarta vmarta deleted the track-no-search-results branch March 20, 2024 21:01
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