Skip to main content
Search insights is Algoliaโ€™s JavaScript library for tracking user interactions, such as clicks, conversions, and views, and sending them to the Insights API. Itโ€™s designed to run in the browser and integrates seamlessly with Algoliaโ€™s search and discovery libraries, including InstantSearch and Autocomplete. To learn more, see:

Install the Search Insights library

To send events from your JavaScript app, either include a code snippet directly in your HTML or install it as a dependency to your project.

Include the Search Insights library in your HTML

Add the following code snippet to the head tag of every page where you want to track events:
HTML
If you prefer hosting your own version, copy the script into your own project.
HTML

Install the Search Insights library as npm package

Add the search-insights package as a dependency to your project:
You can find the source code on GitHub. To initialize the Insights client in your app, see init.
Last modified on March 30, 2026