Concepts / Getting insights and analytics / Best practices for sending click and conversion events
May. 10, 2019

Best Practices for Sending Click and Conversion Events

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 index. 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.

Sending a Conversion event means that a search has converted. In this sense, Conversion = Yes or No, per search, it does not save any more detail. It doesn’t accumulate conversion events; for example, “liking an item” + “adding it to the shopping cart” do 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.

Some other points to consider

  • Because you will be recording country-based information, you need to make sure you send us the relevant IP. Therefore, when doing back-end 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 back-end 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.
  • 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. Keep in mind that we are tracking site search-to-conversion, so only search-derived conversions matter.

Did you find this page helpful?