Event tracking
Event Tracking API
Event Tracking allows Neuralens to learn from a user's behavior and personalize the results for them.
POST
https://api.neuralens.ai/analytics/event
Request Headers
X-Neuralens-API-Key
Bearer YOUR_API_KEY_HERE
X-Neuralens-Application-ID
YOUR_APPLICATION_ID
Request Body
uid
user id. For anonymous users, send anonymous uuids if available, or null
items
id of the product for which the event is triggered. This can contain multiple product ids in case event=PURCHASE. In all other cases it should contain a single product id.
index
The index of the product/suggestion that is viewed, clicked, favorited or added to cart. Index values start at 0
query
The search query text. For example, if a user adds items to cart from search results page, the ADD_TO_CART event object should contain the respective query text.
geo
Location details of the user at the time of event. lat and long are the user's coordinates. region is the name of the region at the level at which user behavior matters in your scenario. This could be a locality, city, city-country, state, or any other internal nomenclature you use depending upon the use case.
Values for Page
The Page parameter defines the page where the event took place
SEARCH_RESULT_PAGE - Search Result Page
AUTOCOMPLETE - Search Autocomplete
CATEGORY_PAGE - All merchandising pages
PRODUCT_PAGE - Product Details Page
Values for Event
The Event parameter defines the type of event
VIEW_PRODUCT
CLICK_PRODUCT
VIEW_SUGGESTION (Autocomplete suggestion)
CLICK_SUGGESTION (Autocomplete suggestion)
LAND_PRODUCT_PAGE
FAVORITE
SHARE
ADD_TO_CART
PURCHASE
Response
Last updated