Guides / Sending events / Implementing events

Sending Events from Your Front End

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 front end, 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 front end, you can send events from refinement and results widgets.

Sending events from a custom front end

If you’re building your own custom front end 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?