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

Click Analytics

At this time, click analytics are only available on Enterprise plans. They can be viewed either in the Dashboard or programmatically via the Analytics API. If you signed up for your plan with an Account Executive, please refer to your service order for your analytics features.

Collecting Clicks and Conversion

Click Analytics helps you answer the following questions: Do users click on a result? If yes, which ones? And do they take a significant action on any one of your products? Any such click is called a click analytic, and any action beyond that, such as viewing, or buying a product, is called a conversion point*

So there are two aspects:

  • Click-Through-Rate (CTR) As a tool to rate search performance, click analytics compiles click rates for all search results. In this context, the click position (Click pos.) can test relevance (for example, preferred items should be higher in the ranking).

  • Conversion (Conv.) As a tool to analyze cause & effect, click-tracking can be used to link every search (cause) to a given conversion event (effect).

Click analytics

Implementing Click Analytics

There are 3 steps to collecting click and conversion events:

1. Setting the clickAnalytics parameter

This is a prerequisite: in order to get started with click analytics, you must set clickAnalytics=true on the query method. This must be done for every search that you wish to track.

2. Identifying the Query, Result, Position

With clickAnalytics set to true, the search method returns a queryID in every search response. You need to use the Query ID to capture click rates and conversions.

3. Sending click and conversion events

You need to send us all click and conversion events. For this, you need to use the events method:

Advice on Capturing Events

  • The idea is to send the click event just before going to the clicked result. This can be coded synchronously, before you process the user’s click event (that is, before you take the user to the clicked result), or in a non-blocking manner. Either way, it’s the same method.
  • If your UI enables the user to go directly to a conversion point, make sure that you are capturing all relevant events that precede the conversion. For example, if you’ve set up one-click buy as a conversion, you need to process both the click and conversion events before proceeding with the actual sale.
  • If a user gets to a conversion point without having first used your search bar - for example, via Google, or an external hyperlink - this is not a conversion. Let’s say adding an item to a shopping cart is your defined conversion, it should be marked as a conversion only if it has followed the Algolia search. It is always important to keep in mind that we are tracking site search-to-conversion, so only search-derived conversions matter.

Events Consistency

For click analytics to be reliable, you need to be consistent. Every click and conversion must be tracked properly. This means that every relevant event must be captured, otherwise the data won’t be complete or accurate.

The goal is to choose a single kind of conversion event and make sure this event is always captured. You also want to make sure that no other kind of event is captured. Algolia only tracks one kind of conversion per search. It can be “putting an item in the shopping cart” or “liking an item”; if you try to capture both events on a given search, you will never know which one was done or whether both were done. This is because Algolia only says Conversion = Yes or No per search, it does not save any more detail, and it doesn’t accumulate conversion events (so “liking” and “adding to shopping cart” does not make conversion = 2 but only conversion = Yes). In general, when you want to see if a search has converted, you need to be clear in your mind what that conversion is.

  • Because you will be recording country-based information, you need to make sure you send us the relevant IP. Therefore, when doing backend search, make sure to forward the IP of the end user. Otherwise Algolia will see the queries coming from only one location - the location of your backend server.
  • Given the “as-you-type” nature of Algolia search, if your user types 5 characters, this will generate 5 queries and therefore 5 Query IDs. In that case, you must use the last query ID. See query aggregation for more on this point.

Did you find this page helpful?