--- title: Recommendation content types slug: '1744' canonical_url: https://docs.coveo.com/en/1744/ collection: leverage-machine-learning source_format: adoc --- # Recommendation content types [Coveo Machine Learning (Coveo ML)](https://docs.coveo.com/en/188/) [Content Recommendations (CR)](https://docs.coveo.com/en/1016/) 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](https://docs.coveo.com/en/185/). **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 e-learning site Recommendations are based on [Coveo Analytics](https://docs.coveo.com/en/182/) view [events](https://docs.coveo.com/en/260/) that are recorded each time a page is accessed by a [user](https://docs.coveo.com/en/250/). You must associate each recorded view [event](https://docs.coveo.com/en/260/) with the appropriate content type, for all of your tracked content. A CR [model](https://docs.coveo.com/en/1012/) 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. . 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. . Add `view` [events](https://docs.coveo.com/en/260/) 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](https://docs.coveo.com/en/1818/)). A developer may need to write some JavaScript code to dynamically detect the appropriate content type that matches your criteria for each page. . Add or edit a Coveo ML CR model to specify a **View content type** filter. In the [Coveo Administration Console](https://docs.coveo.com/en/183/), make sure that the Coveo ML CR model used by your Coveo JavaScript Search Framework [Recommendation component](https://coveo.github.io/search-ui/components/recommendation.html) has a **View content type** filter with the appropriate content types (see ["Recommended Item Types" section](https://docs.coveo.com/en/3399#recommended-item-types-section)). . Validate that the Recommendation component only returns pages of the expected content types. > **Note** > > If you just started pushing view [events](https://docs.coveo.com/en/260/) with content type values, the Recommendation component may return nothing until the Recommendation [model](https://docs.coveo.com/en/1012/) [is retrained](https://docs.coveo.com/en/1727#training-and-retraining) with data that includes content type values.