Track Restaurant View
Last updated
Last updated
You can use the OnlineSales.ai pixel to track your website visitors' product view
action. Tracked product views are used to compute the popularity score, user's affinity, and other signals.
The pixel's must already be installed on every page where you want to track product views.
Restaurant View
event should be fired when a user visits a product page.
All events are tracked by calling one of the library's function with a JSON object as it's parameters.
Following is a function call to track when a visitor has viewed a product on the website:
A list of all the standard events can be found .
You can include the following predefined object properties with any events that support them. Format your parameter object data using JSON.
sellerId
The id of the restaurant who is selling this product. This is mandatory in the case of aggregators.
cli_ubid
Client generated user id. If set, this takes precedence over ubid passed in the cookie. Once generated for a user, it should be same for all the API calls.
An example call of a function with all the product properties:
A complete list of object properties can be found .