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 identified by theuserToken property.
To build and retrieve user profiles:
- Attach a user token to each event so Algolia can associate events with the same user over time.
- Persist anonymous user tokens and authenticated user tokens across sessions so you can 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. Algolia ignores events whose
objectIDvalues don’t match records in the index when computing user profiles. - Events without a
queryIDstill contribute to personalization but Algolia doesn’t report them in search analytics. - You can send events in batches but 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 appropriate subtype:
- When a user adds an item to their cart, send a conversion event with the
addToCartsubtype and associatedobjectData. - When a user purchases an item, send a conversion event with the
purchasesubtype and associatedobjectData.
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.