Guides / Sending events

Algolia provides powerful APIs to track and understand your users’ behaviors. When you send events to the Insights API, the Analytics API calculates and exposes metrics such as click-through rate, conversion rate, and no results rate which you can test and optimize with A/B Testing.

Events are also fundamental in these features:

To use these features, you need to send events correctly. Because different event types require specific information, it’s best to send events using Algolia’s API clients and front-end libraries. The clients offer distinct methods for sending different event types, reducing chances of error.

To validate your implementation of events, you can use the Events section in the Algolia dashboard:

The Chrome Insights validator extension is deprecated and no longer maintained.

Events Hub

The Events Hub takes a snapshot of searches and events recently sent to Algolia to ensure you get the most out of your data. This analysis relies on the fact that a queryID is required to associate each event with a search. You can find the Events Hub under Platform in the Events section in the Hub tab.

Events Debugger

The Algolia dashboard displays events as the Insights API receives them. You can find these logs under Platform in the Events section in the Debugger tab.

By default, the debugger includes these fields:

  • Status: the HTTP response status code for the event
  • Device: whether the event originated from mobile or desktop
  • Agent: the Algolia Insights API client used to send the event
  • Index: the associated Algolia Index
  • User Token: the userToken included with the event
  • Event Type: view, click, or conversion
  • Event name: the eventName included with the event
  • Received at: when Algolia received the event

You can choose to display specific fields or filter on specific values for any of the fields.

For example, you may want to filter on status=4XX to see which events resulted in an error. You can do this by typing status=400, or any other status code, into the search input or selecting the filter icon and toggling on Error under Statuses.

Insights API Logs screenshot

You can also click on any event to see more detailed information such as:

  • Event Details: this includes whether the event can be used for Click Analytics and Personalization and any errors the event caused
  • Event Headers: the referer, Algolia agent, and user agent
  • User Timeline: what other actions the user took, and where this event falls in the timeline
  • Query details: the request and response JSON payloads

Event details in the Insights API Logs

Did you find this page helpful?