Getting Started with Events
Users interact with your site by clicking on search results, viewing category pages, or adding items to a shopping cart. Capturing these user events lets you understand more about your users and their behavior.
You can collect three different types of events:
- View events: a user looked at something, for example, an article, a product, or a landing page
- Click events: a user clicked on something, for example, an item on your home page, a search result, or an advertisement.
- Conversion events: a user performed a critical step in a user journey, for example, liking an article, adding a product to the shopping cart, or purchasing a product.
You can collect these events with Algolia Insights. The Algolia Insights API provides a central access point for your event data, regardless of which platform your website or application runs on.
Why you should send events to Algolia
Capturing user behavior by sending events to Algolia is essential to building search and discovery experiences. Sending events to Algolia unlocks these features:
- Click and conversion analytics: analyze how your search performs. Make data-driven, business-relevant decisions based on analytics.
- Algolia Recommend: use your user events data to deliver recommendations.
- Dynamic Re-ranking: use your user events data to dynamically adjust the ranking of search results in response to trends in your users’ behavior.
- A/B testing: tune your relevance to maximize impact. With A/B testing, you tweak your relevance strategy in small steps and verify which version performed better with click and conversion analytics from real-time user events data.
- Personalization: match the relevance of your search and browse experience to individual user profiles. Sending events to Algolia lets you turn user events into user affinities that you can leverage to build personalized experiences.
When you should think about sending events
Capturing user behavior should be an essential part of your search and discovery strategy. You should send events as soon as possible. For example, if you implement a search user interface with Algolia’s front-end UI libraries, you should add the events when you build the search interface.
Sending events early lets you build more robust implementations and reduce the risk of troubleshooting events in production later. Different Algolia features leverage different event attributes, for example, a queryID
or a userToken
. By adding events early, you can implement them once, and you are well prepared to act on your user data without having to think about implementing events again.
Sending events sooner lets you act sooner on your user data. Different Algolia features require different numbers of events (see the following table).
Required number of events
Algolia feature | Needs at least these events |
---|---|
Click and conversion analytics | Any number of events |
Frequently bought together (Algolia Recommend) | 1,000 conversion events with two or more items within the last 30 days |
Related products and related content (Algolia Recommend) | 10,000 click or conversion events within the last 30 days |
Trending (Algolia Recommend) | 5,000 conversion events within the last 30 days |
AI re-ranking | For a record to be promoted, it has to gather at least 20 clicks or two conversions during the last 30 days |
A/B testing | Any number of events |
Personalization | Any number of events |