-
Notifications
You must be signed in to change notification settings - Fork 21
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: send origin in query tagging #1585
fix: send origin in query tagging #1585
Conversation
Germán 👀 |
* | ||
* @public | ||
*/ | ||
queryFeature: { |
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.
I think would be better to not limit this to the queryFeature. I'd something like:
metadata: {
type: Object as PropType<Omit<WireMetadata, 'moduleName'>>
}
...
function emitEvents() {
Object.entries(props.events).forEach(([event, payload]) =>
$x.emit(event as XEvent, payload, { target: rootRef.value, ...props.metadata })
);
}
I'm not sure if we could have issues with the wiring types. If we do, probably we could even relax them here.
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.
You're right!! 👍🏽
@@ -38,7 +47,7 @@ | |||
*/ | |||
function emitEvents() { | |||
Object.entries(props.events).forEach(([event, payload]) => | |||
$x.emit(event as XEvent, payload, { target: rootRef.value }) | |||
$x.emit(event as XEvent, payload, { target: rootRef.value, feature: props.queryFeature }) |
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.
See comment above
Pull request template
When you click on a brand recommendation, the origin param is not included in the query tagging. That's because the
BaseEventButton
used on theQueryPreviewButton
component emitsUserAcceptedAQueryPreview
event without any feature param in the metadata so that the origin couldn't be created.To fix it, we are going to pass the origin through a prop and it will be added to the event metadata.
Motivation and context
Type of change
What is the destination branch of this PR?
Main
How has this been tested?
Click on a brand recommendation and check if the origin
customer:no_query
is sent in the query tagging.Checklist: