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 provides a snapshot view of the status of your event collection. You can see how many click, conversion, and view events the Insights API received from your application in the last day, the last two days, and the last seven days. You can also check the error rate to confirm, whether you make the most of your user events.

The Events Hub analyzes a snapshot of searches and events recently sent to Algolia to ensure you get the most out of your data. To associate an event with a search, you need to keep track of the queryID. You can find the Events Hub under Data Sources in the Events section in the Hub tab.

Events Hub screenshot

Events Debugger

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

By default, the debugger includes these fields:

  • Status: whether the event was accepted or rejected by the Insights API, and whether the event was forwarded to destinations
  • HTTP: 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 httpCode=4XX to see which events resulted in an error. You can do this by typing httpCode=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?