The Insights API client is part of the @algolia/client-insights package. To install this package, run:

1
npm install @algolia/client-insights

To use this client, run:

1
2
3
import { insightsClient } from "@algolia/client-insights";

const client = insightsClient("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY");

To send events from your front- or backend, consider using the search-insights library instead. It comes with many helper methods for sending specific event types and managing the user token.

List of methods

Each method makes one request to the Insights API.

Events

User tokens

Did you find this page helpful?
JavaScript API clients v5