Skip to main content
This guide walks through a complete ecommerce personalization implementation. You will set up an embedder with personalization, collect user signals, build user profiles, and send personalized search requests that return different results for different shoppers.

Step 1: Set up your product index

Make sure your product index contains rich, descriptive documents. The more relevant fields your documents have, the better personalization can re-rank results:

Step 2: Collect user signals

Track user interactions on your ecommerce site. The most useful signals for personalization include: Store these signals in your user database. You do not need to send raw event data to Meilisearch. Instead, you aggregate these signals into a profile string on your backend.
If you use Meilisearch analytics, you can track clicks and conversions with the events API and use that data to build richer user profiles.

Step 3: Build a user profile string

Transform aggregated signals into a profile string. Focus on positive, affirmative statements:
Example output: "Frequently buys electronics. Prefers Samsung, Sony. Budget-conscious shopper. Recently searched for wireless earbuds, portable speakers."

Step 4: Send personalized search requests

Pass the user profile string in the personalize search parameter:

Step 5: Compare results for different profiles

The same search query returns different result rankings for different user profiles. Here is how results for “headphones” might differ:

Budget-conscious electronics buyer

Profile: "Frequently buys electronics. Prefers Samsung. Budget-conscious shopper."

Premium audio enthusiast

Profile: "Prefers premium products. Audiophile, values sound quality above all. Prefers Sony and Bose." The underlying search results are the same, but personalization re-ranks them based on relevance to each user’s profile.

Tips for effective ecommerce personalization

  • Update profiles regularly. Recalculate the user profile string after each session or purchase to keep it current.
  • Use affirmative language. Write “prefers budget options” instead of “avoids expensive products.” The re-ranking model responds better to positive signals.
  • Keep context concise. One to three sentences is ideal. There is no hard maximum length, but longer strings increase latency and cost without improving results.
  • Test with real users. Compare click-through rates and conversion rates between personalized and non-personalized search to measure impact. Use analytics to track these metrics.
  • Start with high-confidence signals. Purchases and cart additions are stronger indicators than page views or browse time.

Next steps

Getting started with personalization

Enable personalization and perform your first personalized search

Track click events

Use analytics events to collect user signals for personalization

Generate user context

Strategies for building user context from different data sources