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

✨ add click event analytics for autosuggest #3398

Closed
wants to merge 1 commit into from

Conversation

ikesau
Copy link
Member

@ikesau ikesau commented Mar 25, 2024

Adds "click" and "view" events for autosuggest results. They are automatically generated by algolia's analytics client

These can be seen in the debugger: https://dashboard.algolia.com/apps/ASCB5XMYF2/events/debugger

e.g.

image

I'm not yet sure if these will be understood by Algolia as clicks for searches, because it doesn't use the event in analytics if the host is localhost it seems. We'll have to merge and find out 🙂

@ikesau ikesau requested a review from marcelgerber March 25, 2024 23:50
@ikesau ikesau self-assigned this Mar 25, 2024
@@ -264,6 +268,7 @@ export function Autocomplete({
return sources
},
plugins: [recentSearchesPlugin],
insights: getPreferenceValue(PreferenceType.Analytics),
Copy link
Member Author

Choose a reason for hiding this comment

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

Hmmmm I think the fact that we're merging indexes might mess not be compatible with their default solution.

Because even if you click the "first" result that is a chart, it tracks it as position 4

If we want to fix this, I think we'd have to dig into how their library automatically works and try to reconstruct the event data and submitter ourselves.

algolia.index.issue.mp4

@marcelgerber
Copy link
Member

I'm inclined to make this a draft PR until we can fix the problem above.
Do you agree @ikesau, or should I review this already anyway?

@ikesau ikesau marked this pull request as draft March 27, 2024 14:20
@ikesau ikesau removed the request for review from marcelgerber March 27, 2024 14:20
Copy link

This PR has had no activity within the last two weeks. It is considered stale and will be closed in 3 days if no further activity is detected.

@github-actions github-actions bot added the stale label Apr 11, 2024
@github-actions github-actions bot closed this Apr 14, 2024
@ikesau ikesau deleted the autosuggest-analytics branch December 6, 2024 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants