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

fix(insights): add Algolia agent on subscribe #1058

Merged
merged 2 commits into from
Dec 20, 2022
Merged

Conversation

sarahdayan
Copy link
Member

Summary

This adds an Algolia agent on the Insights client when the plugin subscribes so that Insights calls coming from the plugin can be identified as such.

I'm making a direct call on the passed client and didn't implement an addAlgoliaAgent on the wrapped client that we expose in methods. This saves a few bytes, and we don't want users to ever add agents anyway.

Now that the Insights client sends at least one event on subscribe, some tests had to be tightened as they were causing false positives.

FX-2062

@codesandbox-ci
Copy link

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.

@sarahdayan sarahdayan requested review from a team, FabienMotte, aymeric-giraudet, Haroenv and dhayab and removed request for a team December 20, 2022 15:46
@Haroenv
Copy link
Contributor

Haroenv commented Dec 20, 2022

maybe instantsearch-autocomplete-plugin, but that's longer, and would be inconsistent with InstantSearch

@sarahdayan sarahdayan merged commit 60f8ae4 into next Dec 20, 2022
@sarahdayan sarahdayan deleted the fix/add-algolia-agent branch December 20, 2022 16:01
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.

3 participants