Coveo Machine Learning Recommendation Content Types

Coveo™ Machine Learning (Coveo ML) Recommendations support to discriminate different content types when you want to include lists of recommended content for one or more specific types. You must plan and define the content types that are relevant to your content and the recommendation needs of your organization.

In your various websites, you want to add separate recommendation sections for the following content types:

  • products - Specific corporate website pages

  • downloads - Specific corporate website pages

  • articles - All your help site pages

  • courses - Main pages of your eLearning site

Recommendations are based on Coveo usage analytics page view events that are recorded each time a page is accessed by a user. You must associate the appropriate content type to the page view event recorded for all your tracked content.

A Recommendation model can then use the contentType value to narrow recommended pages to one or a few specific content types.

To take advantage of recommendation content types

Before starting the following procedure, be aware that taking advantage of recommendation content types requires developer skills.

  1. Define appropriate content types for your organization:

    • Identify the various types of content that you have in your various websites.

    • Identify the ones that could be useful in recommendations.

    • Define the names of each useful content type.

    • Define criteria to detect that a page is of a specific type.

      On your corporate website, the path under which pages appear defines the specific content types as shown in the following table. All pages under these given paths are of the specified content type. Pages under other paths would have no content types.

      Content type Website path
      products /en-us/solutions/products/*
      downloads /en-us/solutions/downloads/*

    The contentType values can be whatever you want, but you should carefully plan the values to push to meet your recommendation short and long term needs.

    If you later change your mind on the content type names or want to add new ones, you will need to redo the following steps and wait for data to be recorded with the new content types before you can start to see relevant recommendations for those content types.

  2. Add pageView events code including appropriate contentType values.

    Communicate the content type names, criteria, and pageView script code sample to whoever will add or edit the Coveo usage analytics code to your websites (see Pushing Coveo Usage Analytics Page View Events).

    A developer may need to write some JavaScript code to dynamically detect the appropriate content type matching your criteria for each page.

  3. Add or edit a Coveo ML Event recommendation model to specify a View content type filter.

    In the Coveo Cloud administration console, ensure that the Coveo ML Event recommendation mode used by your Coveo JavaScript Search Framework Recommendation component has a View content type filter with the appropriate content type(s) (see Managing Coveo Machine Learning Event Recommendations Models in a Query Pipeline).

  4. Validate that the Recommendation component only returns pages of the expected content type(s).

    If you just started pushing page view events with content type values, the Recommendation component may return nothing until the Recommendation model is retrained with data that includes content type values (see Training and Retraining).