-
Notifications
You must be signed in to change notification settings - Fork 389
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
feat (api): Adds ability for click insights events to be triggered #1916
Conversation
✅ Deploy Preview for docsearch canceled.
|
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.
Cool! 🥳
item: InternalDocSearchHit, | ||
itemPosition: number | ||
): InsightsParamsWithItems<ClickedObjectIDsAfterSearchParams> { | ||
const insightsItem = item as AlgoliaInsightsHit; |
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.
Could we run into issues with this assertion?
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 don't think so, if we have an insights
plugin active the needed attributes are added to the item
. All AlgoliaInsightsHit
type adds is better typings for the __autocomplete_*
attributes.
Co-authored-by: François Chalifour <francoischalifour@users.noreply.github.com>
Recently we added insights options for DocSearch in #1904. This PR now also adds in the ability for click analytics to be triggered as well when insights option is active.