Skip to content

fix(insights): split large view event payloads into multiple chunks#1087

Merged
dhayab merged 3 commits intonextfrom
fix/insights-view-events-chunks
Feb 10, 2023
Merged

fix(insights): split large view event payloads into multiple chunks#1087
dhayab merged 3 commits intonextfrom
fix/insights-view-events-chunks

Conversation

@dhayab
Copy link
Copy Markdown
Member

@dhayab dhayab commented Feb 10, 2023

Insights events containing more than 20 object IDs fail to be processed by the Insights API. This can happen with Autocomplete when an Algolia source shows more than 20 items (using hitsPerPage for example).

This PR ensures payloads containing more than 20 items are correctly split into smaller chunks that can be processed by the Insights API.

It also fixes another issue when only events from the first Insights-compatible plugin and/or source would be sent. For example, when typing on an Autocomplete that has both the Query Suggestions plugin and one or multiple Algolia sources, only the view events from the Query Suggestions are sent.

@codesandbox-ci
Copy link
Copy Markdown

codesandbox-ci Bot commented Feb 10, 2023

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 245437b:

Sandbox Source
@algolia/autocomplete-example-github-repositories-custom-plugin Configuration
@algolia/autocomplete-example-instantsearch Configuration
@algolia/autocomplete-example-playground Configuration
@algolia/autocomplete-example-preview-panel-in-modal Configuration
@algolia/autocomplete-example-react-renderer Configuration
@algolia/autocomplete-example-starter-algolia Configuration
@algolia/autocomplete-example-starter Configuration
@algolia/autocomplete-example-reshape Configuration
@algolia/autocomplete-example-vue Configuration

@dhayab dhayab marked this pull request as ready for review February 10, 2023 12:08
@dhayab dhayab requested review from a team, Haroenv and aymeric-giraudet and removed request for a team February 10, 2023 12:08
@dhayab dhayab merged commit df58096 into next Feb 10, 2023
@dhayab dhayab deleted the fix/insights-view-events-chunks branch February 10, 2023 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants