Coveo Machine Learning Event Recommendations Deployment Overview

The Coveo™ Machine Learning (Coveo ML) event recommendations are based on recorded user navigation history such as user search activities as well as page views on your websites (see Event Recommendations Feature).

The more navigation data, the better the recommendations. You should therefore start pushing search and page view events to the Coveo usage analytics service as soon as possible from your websites for which you want to be able to propose recommendations.

In a technical documentation site, you can add a Recommended Topics list to complement the table of content and suggest topics most often visited by other users with similar search and navigation sessions.

JsSearch-RecommendedTopics3

To deploy Coveo Machine Learning Event Recommendations

Before starting the following procedure, be aware that deploying Coveo ML Event Recommendations requires developer skills.

NewFeature-Recommendations1

  1. Optionally, plan the content type to recommend:

    While optional, if you want to eventually recommend specific content types, you should think about it before going to far. Both the Event Recommendation models and the Coveo JavaScript Search Framework Recommendation component support to include recommendation of specific content types. Determine what are the content types that you may want to be able to specifically recommend (see Coveo Machine Learning Recommendation Content Types).

  2. Optionally, plan the usage of custom contexts to improve recommendation relevance:

    Using appropriate custom context can take recommendation relevance one step further.

    You can define custom contexts that are relevant to your business and then pass appropriate ones along with usage analytics events and queries to allow Coveo ML recommendations to take them into account (see Leveraging Custom Contexts in Coveo Machine Learning Features).

  3. Get an API key:

    You need API keys for two independent processes:

    • Allow code in one or more websites to push usage analytics page view events that will feed the recommendation model (see Push website page view events.).

    • Allow your Recommendation component to send queries and receive search results as well as send analytics events (so you can track the component usage) (see Initializing a Recommendation Component).

    When the search or website page in which you include the Recommendation component requires user authentication to be able to return secured results, you must use a search token that is generated for each user to initialize the component.

    A developer must set up a server-side mechanism to generate the search tokens using an API key that also carries the Search - Impersonate privilege (see Search Token Authentication).

    You can typically share the same API key or search token when both the page view event push code and the Recommendation component are both included in the same page.

    Create an API key with the following privileges (see Add an API Key):

    • For the Analytics data privilege, select the Edit checkbox.

    • For the Execute queries privilege, select the Enable checkbox.

    An API key with privileges limited to the ones mentioned above can safely be included in client-side code, but you must ensure that the API key does not carry other sensitive privileges (see Privileges).

  4. Push events to the usage analytics service:

    1. Push website page view events.

      Start pushing page view events to the Coveo usage analytics service as soon as possible from as many relevant sites as possible by adding the coveo.analytics.js code snippet to all pages of each of you websites (see Coveo Machine Learning Recommendations Complete Code Sample).

      The coveo.analytics.js code also takes care of recording the session navigation history in the __coveo.analytics.history browser cookie. The recommendation model needs this session navigation history to determine relevant content to return.

    2. Push search events.

      The Coveo ML Recommendation service also takes into account queries made by users in your Coveo search page(s). If not already done, ensure your Coveo products push search events to your Coveo Cloud organization (see Getting Started With Coveo Usage Analytics).

  5. Create a Coveo ML Event Recommendation model in a dedicated query pipeline.

    Do not add a Recommendation model in the Default pipeline. Otherwise, the Content Browser and any other search interface using the Default pipeline will break.

    • Use a dedicated query pipeline for your Event Recommendation model to ensure that other search optimization features such as the Automatic Relevance Tuning (ART) or Ranking Expressions do not interfere with the Event Recommendations model results.

    • When you want to propose more than one type of recommendations, create one Event Recommendations model for each content type to recommend, each with its dedicated pipeline.

    1. In the Coveo Cloud administration console, create a new pipeline that will contain only one Event Recommendations model (see Managing Query Pipelines).

      Note the name of your pipeline. You will need it when you integrate a Recommendation component in a web page (see Coveo Machine Learning Recommendations Complete Code Sample).

    2. In your new pipeline, create a Recommendation model for the type of recommendations that you want to include in your pages (see Managing Coveo Machine Learning Event Recommendations Models in a Query Pipeline).

  6. Include the recommendation results in your web pages.

    Coveo JavaScript Search Framework 1.667.24 - July 2016  The Coveo JavaScript Search Framework comes with a Recommendation component that you can easily add into your website pages to create one or more recommendation sections (see Coveo Machine Learning Recommendations Complete Code Sample).