userToken on search requests.
If you send searches from your backend, set a userToken to avoid grouping many users under the same server IP address.
To learn what a user token is, how to generate it, and how to handle anonymous and authenticated users, see User token.
A
userToken is also required for Personalization.Before you begin
Use the sameuserToken for searches and click and conversion events so analytics can associate activity with the same user.
Set the user token in InstantSearch and Autocomplete
Set theinsights option to true when initializing InstantSearch or Autocomplete.
- Send click and conversion events with Autocomplete
- Send click and conversion events with InstantSearch.js
- Send click and conversion events with React InstantSearch
- Send click and conversion events with Vue InstantSearch
Set the user token in InstantSearch iOS and Android
Add theuserToken as an API parameter to your search requests:
Set the user token with API clients
Use the sameuserToken in search requests and click and conversion events.
To set the user token per search request:
If you can’t set a user token
If you search from your backend and can’t or don’t want to set auserToken,
you can forward user IP addresses to improve analytics accuracy.