This feature isn’t available on every plan.
Refer to your pricing plan to see if it’s included.
Attach user tokens to events
Advanced Personalization builds user profiles from click and conversion events. TheuserToken property identifies these events.
To build and retrieve user profiles:
- Attach a user token to each event so Algolia can link events to the same user over time.
- Persist anonymous user tokens and authenticated user tokens across sessions. This lets you retrieve user profiles at search time.
setUserToken method.
You can either set a global user token or send a user token with an individual event:
- Set a global user token
- Send a user token with a specific event
JavaScript
Event properties
To contribute to Advanced Personalization, events must reference records in an existing index.- Link events to an existing index. When computing user profiles, Algolia ignores events whose
objectIDvalues don’t match records in the index. - Events without a
queryIDstill contribute to personalization. Algolia doesn’t show them in search analytics. - You can send events in batches. Each event timestamp should reflect when you collected the event.
Send conversion events with subtypes
Conversion events help enrich user profiles for Advanced Personalization. When users convert, send aconversion event with the matching subtype:
- When a user adds an item to their cart, send a conversion event with the
addToCartsubtype and matchingobjectData. - When a user purchases an item, send a conversion event with the
purchasesubtype and matchingobjectData.
Check your events implementation
- Visit your website and interact with it to generate events.
- In the Algolia dashboard, check the Events debugger to confirm that Algolia receives your events.