Recommendation content types

Coveo Machine Learning (Coveo ML) Content Recommendations (CR) can discriminate between 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.

Example

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 (Coveo UA) view events that are recorded each time a page is accessed by a user. You must associate each recorded view event with the appropriate content type, for all of your tracked content.

A CR model can then use the contentType value to narrow its recommendations to one or more specific content types.

To take advantage of recommendation content types

Note

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 types of content that could be useful for recommendations.

    • Define the names of each useful content type.

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

    Example

    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 paths are of the specified content type, and pages under other paths wouldn’t have a content type.

    Content type Website path

    products

    /en-us/solutions/products/*

    downloads

    /en-us/solutions/downloads/*

    Note

    The contentType values can be whatever you want, but you should 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’ll 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 view events code, including appropriate contentType values.

    Communicate the content type names, criteria, and view event code sample to whoever will add or edit the Coveo UA code to your websites (see Leverage the Coveo UA library).

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

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

    In the Coveo Administration Console, make sure that the Coveo ML CR model used by your Coveo JavaScript Search Framework Recommendation component has a View content type filter with the appropriate content types (see "Recommended Item Types" section).

  4. Validate that the Recommendation component only returns pages of the expected content types.

    Note

    If you just started pushing 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.