The Real Deal – Coveo Recommendations

In my last post, I focused on the visual clues. If you have not already, please read the first post on coveo recommendations here

In this post, we will focus on actual steps once you did decide that Coveo Recommendations will serve your requirement on hand. Coveo, as always does awesome job with the documentation on how to use recommendations by following the steps noted below. Since Coveo does such a good job at documentation, I am not going to repeat myself here and refer you all to check out this page here

Now to highlight our experience when we followed the steps noted on the Coveo documentation, we learned the below on each step along the way:

Step #1 – Currently, there is no way to actually see the page view events from Coveo Administrative tool, but, you have two check points to quickly note if page views are being captured. Quick screenshots below for reference

Step #2 & Step #3 : It is one of the most straight forward steps and after you quickly add the pipeline and model, you should be able to see them up on Coveo Administrative tool

Go to Models under Machine Learning section

Query Pipelines
You should be able to click on Pipeline, go to machine learning tab and click on edit for the model to see the settings on training set, that is one of the most important settings to ensure you set to appropriate values based on your data set.

Step #4 & Step #5: We figured that this is actually not needed in our case. It was working fine with out doing any additional set up, turns out this was just for sanity or may be older versions of Coveo for Sitecore, not sure. But, was not needed for us.

Step #6 : So, this step once we have our own datasource item, we added Coveo Recommendations to our presentation on all templates that needed to show this component. When we added this component, we could see a new call fire off on XHR requests that would go fetch recommendations. It also started maintaining history of the user views and sent that along with request. We encountered an error here because one scenario where special characters persisted in Title field of the page would cause server error as noted here . We submitted a PR for this scenario and the fix was included in latest release of JS framework

That is it and the last step was publish and we figured we should start seeing recommendations right away. But, it is not that simple. 🙂 In my next post, I will go over the various tricks we did to get the recommendations to show on our pages where we inserted this component.

Additional note here, we did want to show only product recommendations, so, to avoid additional filter additions in our case, we chose to add content type on our page views which we can then utilize on our filter on model to show only specific content type like below.

As you can see the specific filter allows you to pass in a string for content type which is actually set on Sitecore on the rendering properties for Coveo Page Analytics
This should be picked on datasource set on Coveo Page View Analytics rendering

Next up, I will share how we did the filters, forced recommendations, a quick tip shared by @vbernard when everything else fails on how to trick the system to actually send in some recommendations and any other issues we encountered while implementing recommendations using Coveo.

Visual Clue for Coveo Recommendations

Coveo offers a bunch of cool ML functionality. As some of you may already know, growing and providing ML relevance in various streams of website journey is one the main goals of Coveo and where it is heading as an Enterprise product. Coveo has some very good documentation on what their ML components are and how to get started with these here

But, given all that, it is still hard to put a finger on to whether a specific ask or requirement could fit in and benefit with the use of Coveo ML component. So, I decided to blog on our journey beginning from a thought to reality. It was a lot of fun and some additional twists due to lot of context specific filters that were needed to ensure we only show what is truly relevant to the context to top the recommendations that Coveo thinks are apt based on user journey.

So, in this blog I would like to focus on when to know and understand that the current requirement on hand could be a good candidate to implement Coveo solution instead to get the powerhouse technical bits that Coveo is real proud of. Now, it all started when for the very first time I heard a high level requirement around showing recommended products on a e-commerce platform based on user history in combination with couple of Sitecore based fields. My first immediate thoughts and concerns when I hear lot of content management effort would be :

  • Data Integrity – When lot of manual steps are involved, it is usually hard to have a tap on data integrity even with proper workflows in place
  • Tedious and frustrates Content Authors – The more there are to steps, the more it keeps getting on the pile of TODO for the team of CA. Probably the team might never get to it if the priorities change

Now, lets focus for a second on first requirement, so, it is based on user browsing history. If we are confident on the patterns and can learn from how user navigates between products, do we then have a better way of projecting what the user may be interested in rather than making our CA team work hard? Yes, it is an absolute Yes!. Coveo Recommendations component does exactly that by tracking and learning constantly as user explores the site, the model is then capable of returning recommendations.

So, say, there is a scenario where user interactions should not matter and probably the relation ship data between products is coming from a ERP or CRM based system? In this case, since we do not need relevance power of Coveo and is just mostly business logic driving a finite result set, this would be a perfect opposite use case where you could pull it off with few simple SOLR queries to get what you need.

It is very important to get the decision finalized before you dive deep and actually use a cool component Coveo has handy. So, if you are going forward with implementing Coveo Recommendations component, this is a good place to start and understand the steps needed to build one. In my next blog as part of this series, I will explain each one in detail, later will move on to context based filters, hive components to use, sample results to test some HTML with.