Skip to main content
Autocomplete, InstantSearch, and Recommend in the Algolia app blocks now support version 5 of the Algolia API client. Most stores only need to switch the search client version setting to Version 5. If you use custom storefront JavaScript, follow the version 5 upgrade guide. Support for version 4 ends on August 14, 2026.
The events algolia.instantsearch.hitClickAction and algolia.autocomplete.hitClickAction are deprecated since March 31, 2025. Use beforeInstantSearchProductTemplate and beforeAutocompleteProductTemplate events instead.
The InstantSearch and Autocomplete libraries emit global events. You can’t pass data to the global events but you can listen to them.
  • algolia.autocomplete.beforeInit. Fires before the Autocomplete library initializes.
  • algolia.autocomplete.afterInit. Fires after the Autocomplete library initializes.
  • algolia.autocomplete.hitClickAction (deprecated). Deprecated. Use beforeAutocompleteProductTemplatefor adding click events. Fires when a user clicks an Autocomplete result.
  • algolia.instantsearch.beforeInit. Fires before the InstantSearch library initializes.
  • algolia.instantSearch.afterInit. Fires after the InstantSearch library initializes.
  • algolia.instantsearch.hitClickAction (deprecated). Deprecated. Use beforeInstantSearchProductTemplate for adding click events Fires when a user clicks an InstantSearch result.
  • algolia.instantSearch.onError. Fires when the InstantSearch library reports an error.
  • algolia.instantSearch.onRender. Fires when all InstantSearch widgets finish rendering.
  • algolia.instantsearch.beforeInitSortOrders. Fires before InstantSearch sorting initializes.
  • algolia.instantsearch.beforeInitFacets. Fires before InstantSearch facets initialize.
  • algolia.hooks.initialize. Fires before Algolia hooks initialize.
  • algolia.analytics.beforeInit. Fires before the Algolia Insights API initializes.

Example

JavaScript
Last modified on September 16, 2026