This feature isn’t available on every plan.
Refer to your pricing plan to see if it’s included.
Send events to Algolia
For more details, see:Attach user tokens to events
To ensure that Advanced Personalization can understand each user’s journey and continuously improve their personalization experience, you must attach a user token to each event. For user profiles to be found and retrieved at search time, you should persist anonymous user tokens and authenticated user tokens across sessions. User profiles are identified by theuserToken
property sent with Insights events.
Attach user tokens with InstantSearch
If you’re using Algolia’s UI libraries, you can attach user tokens with InstantSearch.Attach user tokens with an API client
Use the Search Insights library’ssetUserToken
method to send the user token with every event or for each event.
Send with every event
JavaScript
Send with each event
JavaScript
Events properties
Events must be linked to an existing index. Events with object IDs that aren’t found in an index are ignored when computing user profiles. Events without aqueryID
can be used in personalization,
but they won’t be reported in Algolia’s search analytics.
You can send events in batches.
Their timestamps must be set to the time of their collection.
Send conversion events with subtypes
When your users perform conversion events, you need to send a specialconversion
event with the relevant subtype (addToCart
or purchase
).
- When a user adds an item to their cart, send a conversion event with the
addToCart
subtype and associatedobjectData
. - When a user purchases an item, send a conversion event with the
purchase
subtype and associatedobjectData
.
Check events implementation
- Visit your website and interact as a user: generate some events.
- Check the Events debugger in Algolia’s dashboard to verify that your events are being sent.