Guides / Sending events / Implementing events

Sending events from your frontend

When you’re building your search and browse interface, one important step is to send user events to Algolia Insights. Gathering user events is necessary to enable features like Personalization and Recommend, even if you don’t use them right away.

If you’re using one of Algolia’s UI libraries such as InstantSearch or Autocomplete, you can leverage their integrations to send user events to Algolia Insights.

Sending events with Autocomplete

If you’re using the Autocomplete UI library in your frontend, you can automatically send events to Algolia Insights and other analytics providers whenever a user interacts with the autocomplete menu.

To do so, you can use the autocomplete-plugin-algolia-insights plugin and the search-insights library.

Sending events with InstantSearch

If you’re using InstantSearch in your frontend, you can send events from refinement and results widgets.

Sending events from a custom frontend

If you’re building your own custom frontend without leveraging any of Algolia’s UI libraries, you can use the JavaScript API client and the search-insights library to send events.

Did you find this page helpful?