-
Gather user data, which breaks down into:
- Plan which user behavior to track
- Capturing user behavior by sending events
- Configure your personalization strategy, including simulating and testing
- Enable personalization in production
This feature isn’t available on every plan.
Refer to your pricing plan to see if it’s included.
Plan which user behavior to track
User behavior, both search and non-search related, give insight into their affinities. For example, when your users click products, bookmark pages, visit category pages, add items to their cart, watch videos, and read articles, they’re signaling preferences. In the context of personalization, Algolia calls these user preferences “affinities.” Each time a user engages in meaningful behavior, you can send an event to Algolia so that the engine can use it to build that user’s affinity profile. Before sending events, you must understand your users’ behavior and plan which ones you’ll collect. Without pre-analysis and planning, you could end up with inconsistent user data which will make later stages more difficult. For more information, see Plan your implementation.Capture user behavior by sending events
After determining which behaviors you want to track, you need to send Algolia events that capture all the behaviors’ important aspects. These events give Algolia the user-based information needed to construct user affinity profiles. Sending events requires integrating short code snippets in your frontend components that correspond to your user behaviors. Suppose that adding a product to the shopping cart is a meaningful user behavior. Then you need to add code to the “Add to cart” button to send an event containing information about which user just added which product to the shopping cart. You can refer to separate guides for how to send events to Algolia using the frontend libraries and API clients. The engine uses many of the same events for Click, conversion, and revenue analytics and other advanced features such as A/B testing and Dynamic Re-ranking. To consistently track activity, regardless of which features the data is used for, you should plan which user behaviors to monitor before sending any events. For more information, see Capture user behavior as events for more information. Because different event types require specific information, it’s best to use the API clients, which offer distinct methods for sending different event types. You can send events from anywhere in your website or application. It’s essential to be consistent with the naming and meaning of events throughout your application. Using the same event name for the same behavior means that you can use the same events, whatever the platform, for example, on your website and mobile application.Sending events requires coding.
Configure your personalization strategy
A personalization strategy is all the configuration choices required to build accurate user affinity profiles. You need to configure personalization because a one-size-fits-all approach doesn’t work well since different business objectives require different strategies. Configuring your personalization strategy comes down to three questions:- Which events should you include, and how important are they relative to one another?
- Which facets should you include, and how important are they relative to one another?
- How significant an impact should personalization have on your relevance?
Simulate and test your personalization strategy
Knowing how important each event and facet should weigh in your strategy can be tricky. Though you may know that purchasing is a stronger signal than liking, it can be hard to decide how much stronger it should be. Similarly, you may not know how much of a role you want personalization to play in your ranking. That’s why the Personalization section of the dashboard includes a simulator. The simulator lets you simulate the effect of potential strategies on real user profiles before actually putting the strategy into production. Even after configuring a strategy that you’ve vetted by simulating multiple users, it’s best to use the A/B testing feature. The feature lets you test personalization on some percentage of your users before adopting it wholesale. Personalization can have enormous consequences for your relevance and search experience. Careful planning and caution in each step of the process are essential. Use the Algolia dashboard to simulate your strategy and run A/B tests. For more information, see:Turn on personalization in production
For your users to receive personalized results, you need to do two things:- Enable personalization at query time.
- Let Algolia know which user is making which query.
enablePersonalization
to true
,
either as index setting or as a search parameter.
If you enable enablePersonalization
as an index setting,
every query made to that index uses personalization by default unless overridden at query time.
Whether you set enablePersonalization
at query time or at the index level,
you must send a user’s userToken
with each query you want to personalize.
Without it, Algolia doesn’t know which user affinity profile to apply to personalize the results.
Enabling personalization in production requires coding.