-
Notifications
You must be signed in to change notification settings - Fork 514
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
fix(recommend): provide insights query parameters to recommend queries #6123
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit b057a43:
|
8498792
to
02de7c2
Compare
a6c730c
to
e945286
Compare
queryParameters: Object.assign(query.queryParameters || {}, { | ||
clickAnalytics: searchState.clickAnalytics, | ||
userToken: searchState.userToken, |
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.
Q: If the client passes queryParameters
to the recommend widget, do they "lose" automatic event collection ?
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 is augmented thanks to Object.assign()
, but it's a good idea to have a specific test for that, I'll add it to the PR.
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.
✨✨✨ 💖 👍 WUNDERBAR 👍 💖 ✨✨✨
Moving this back to draft for now (see discussion thread). |
b7755fa
to
828d0cb
Compare
828d0cb
to
b9d90b5
Compare
@dhayab Should we close this PR for now? |
Summary
This PR updates the recommend queries with
clickAnalytics
anduserToken
to allow the API to properly enable event collection.Result
Recommendations are now returned with a
queryID
and events sent from Recommend widgets send this value when insights is enabled in InstantSearch.