Concepts / Getting insights and analytics / Search Analytics
Feb. 12, 2019

Search Analytics

Search Analytics facilitates modeling by breaking down user searches into numerous categories of data, like popular searches, number of “no results”, and filter usage. The goal of search analytics is to ensure that your search experience is data-driven.

This requires no extra effort on your side - meaning no coding required. It is also transparent to your users. In the background, Algolia gathers large amounts of search-related analytics, capturing data with every search.

From a technical point of view, these metrics will get you thinking more objectively about how to structure your product data, and how to configure your ranking and relevance; they can also lead you to use more advanced API settings to improve your users’ search experience.

For your business, there are an unlimited number of benefits - You can see whether your products are properly described or represented, whether the correct products show up in your search results, and whether, based on the searches, you have too much of one product and not enough of another.

Algolia collects Search Analytics for every customer, offering a detailed view of their end users’ search activities. All customers can view this data on the Algolia Dashboard. However, to fetch it programmatically, using the Algolia Analytics API, you’ll need to be on an Enterprise plan.

  • Overall search counts
  • A “No search result” rate
  • Top searches
  • Top searches with no results
  • Top results
  • If a filter is provided, top searches associated with that filter
  • Top filter attributes and filter values
  • Distinct count of IP addresses / Users
  • Top countries

Here’s an example of what you can expect to measure with Search Analytics:

Search analytics

Note that we are not yet talking about click analytics, which is described here.

Accessing Analytics data

Search Analytics are captured automatically. There is nothing you need to do for Algolia to build your search analytic data.

Additionally, collecting this data has no impact on the speed of search.

With the Dashboard

All Analytic data is accessible ready-made, in graphical format via our Analytics Dashboard. Our Analytics Dashboard walks you through all of our metrics. Everything is clickable, you can drill down on some metrics, and we provide hints and an easy UI to help you navigate through this data.

With this API

The data is accessible from your Algolia dashboard but if you want, you can use our analytics REST API to retrieve the results of your search analytics for reporting.

API Ref Analytics

Query Aggregation

Our search engine is designed to accept queries at each keystroke. In order to have relevant analytics data, however, we aggregate the series of keystrokes to keep only the latest (final) query made by the end user.

In the dashboard, the queries are the search queries made to the engine directly and the searches are the aggregated search queries used by the analytics. For example, if the users type “key”, it will perform 3 search queries (“k”, “ke, and “key”), but we’ll only use “key” as a search in the analytics.

That’s what we mean by “prefix” aggregation.

We use other query aggregation techniques, such as edit distance, timestamp, and, most importantly, user ID. The user ID is by default the IP. It is thus important that requests contain the actual end user IP. For back end implementation that means relying on the X-Forwarded-For header. Without this, the aggregations and thus most of the metrics won’t be properly computed. Alternatively, a custom token can be provided using the X-Algolia-UserToken header.

Did you find this page helpful?