Guides / Sending events / Concepts

The Algolia Insights API accepts three types of events: click, conversion, and view events. By sending events, you can enable one or more Algolia features.

To get started with your implementation, see Get started with click and conversion events.

The event names on this page are the method names in the Algolia API clients.

Events by features

The following table lists events and where they’re used.

To learn more about the properties of each event, see Event properties.

For Personalization, check that you’re sending valid events that capture all necessary information.

Minimum number of events

Algolia Recommend and Dynamic Re-Ranking need a minimum number of events to be active. The other features enabled by events don’t require a minimum number of events, but they need at least a few events to be useful.

Minimum number of events for Algolia NeuralSearch

You need to collect at least 1,000 clickedObjectIDsAfterSearch or 100 convertedObjectIDsAfterSearch events within 30 days to activate NeuralSearch. If you have fewer events, you can’t use NeuralSearch.

Minimum and maximum number of events for Algolia Recommend

Algolia Recommend models need a minimum number of events to make useful recommendations.

By default, Recommend takes events from the last 30 days. If there aren’t enough events for training the Frequently Bought Together and Related Product models, the collection period extends to 90 days.

To prevent performance issues, each model also has a maximum number of events.

Minimum number of events for Dynamic Re-Ranking

A record needs at least 20 clickedObjectIDsAfterSearch or 2 convertedObjectIDsAfterSearch events within the last 30 days to be eligible for Dynamic Re-Ranking.

Records with fewer events won’t be re-ranked.

Other Algolia features

The other events-enabled Algolia features don’t require a minimum number of events. The more events you send, the better these features work.

Events on category pages

You can build category pages with Algolia by sending a request with an empty search query and an applied filter.

Because category pages are just a different form of search requests, you’ll use the same events for category pages and search results.

Some events come in two variants:

Event Variant Variant
Click clickedObjectIDsAfterSearch clickedObjectIDs
Conversion convertedObjectIDsAfterSearch convertedObjectIDs

Events related to an Algolia (search or browse) request must include a query ID.

What is the query ID?

The queryID is a random sequence of letters and numbers that uniquely identifies a search request. Algolia uses the query ID to connect a search or browse request to a click or conversion event. Use the events debugger to check which search API request corresponds to which event. Algolia generates the query ID and includes it in the API response if you set clickAnalytics to true when making the search request.

Since conversions often occur outside Algolia-driven experiences—for example, from the shopping cart, you need to keep track of the query ID on your site.

To track events after a previous Algolia search or browse request, set the clickAnalytics parameter to true and use the clickedObjectIDsAfterSearch or convertedObjectIDsAfterSearch methods.

Examples include:

  • A user searches and clicks a search result to visit a detail page. You can track this by sending a clickedObjectIDsAfterSearch event.
  • A user converts on a category page you built with Algolia. You can track this by sending a convertedObjectIDsAfterSearch event.

Click and conversion events with a queryID are time-sensitive. They must occur within one hour of the corresponding search request.

Events unrelated to Algolia requests

To track events that are unrelated to a previous Algolia search or browse request, use the clickedObjectIDs and convertedObjectIDs methods.

Examples include:

  • You’re not using Algolia to build your category pages. Use clickedObjectIDs to track clicks and convertedObjectIDs to track conversions.

  • You’re sending emails with recommendations. When users click a recommendation and buy an item, track the conversion with convertedObjectIDs.

  • In a buy-online, pick-up in-store scenario, the conversion finishes hours or days after the initial search or browse request. Use convertedObjectIDs to track the conversion.

Did you find this page helpful?