algolia / instantsearch

⚡️ Libraries for building performant and instant search and recommend experiences with Algolia. Compatible with JavaScript, TypeScript, React and Vue.
https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js/
MIT License
3.73k stars 526 forks source link

fix(insights): deduplicate view events #6414

Closed aymeric-giraudet closed 4 weeks ago

aymeric-giraudet commented 4 weeks ago

Summary

CR-6960

Fixes #5442

Result

Only did it for view events because they're the only ones that we got issues for. Tried to make it a bit more future proof for when we implement it with intersection observer, we look for differences between what we try to send vs what was already sent. It resets when we receive a new query.

codesandbox-ci[bot] commented 4 weeks ago

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 8963a60dffbb22d1cdfa44869613291854025620:

Sandbox Source
example-instantsearch-getting-started Configuration
example-react-instantsearch-getting-started Configuration
example-react-instantsearch-next-app-dir-example Configuration
example-react-instantsearch-next-routing-example Configuration
example-vue-instantsearch-getting-started Configuration