Recent Products

The selection made in the KMC for whether to display show recently viewed products will no longer have any effect on the frontend with Klevu JS Library. It is up to you to determine whether to include recent products and how to display them.

There is no method via our API to retrieve recent products for your search instance. In our legacy JS implementation, recent searches were tracked via a Cookie named klevu_rcp which stores the IDs of the products that have been clicked within our JS logic. It is entirely up to you how you track and store a recent product for a particular customer, including the business logic around what constitutes a recent product (eg. a view, a click, its appearance in a search result, etc.).

Should you wish to include recent product functionality, and have decided on your approach to track this per customer, to render those products in your quick search you can follow the example in our tutorial repository.