addSearch

The Search and Also Purchased premium recommendation algorithm requires you to implement one or two addSearch method calls to send customers' search query data for use with a recommendation strategy configured with this recommendation type. One method call is for site search, and the other is for category search. Implementing both is preferred.

Contact your dedicated Customer Success Manager (CSM) if you want to add the premium recommendation algorithms to your account.

Code Samples

In addition to implementing these method calls, you must also contact your dedicated CSM to request that the latest script for this recommendation algorithm be pushed to your account so that you can make use of its full capabilities.

// Site Search
window.monetateQ.push([
  "addSearch", {
    "searchTerm": "this is a test",
    "searchType": "site"
  }
]);
window.monetateQ.push([
  "trackData"
]);
// Category Search 
window.monetateQ.push([
  "addSearch", {
    "searchTerm": "kids",
    "searchType": "category"
  }
]);
window.monetateQ.push([
  "trackData"
]);