Recent Searches

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

There is no method via our API to retrieve recent searches for your search instance. In our legacy JS implementation, recent searches were tracked via a Cookie named klevu_rs which stored search terms based on some criteria defined within our JS logic. It is entirely up to you how you track and store a recent search for a particular customer.

Should you wish to include recent search functionality, and have decided on your approach to track them per customer, to render those search terms in your quick search you can follow the example included in our Hello World tutorial which includes auto-suggestions, page and category suggestions.