Including Coveo JavaScript Search Framework in a Page with Recommendations

When you want to take advantage of Coveo Machine Learning recommendations in a website page, you must add a Coveo JavaScript Search Framework Recommendation component to the page (or pages - typically modifying the appropriate website template) (see Coveo Machine Learning Event Recommendations Deployment Overview and Coveo Machine Learning Recommendations Complete Code Sample).

When you add a Recommendation component in a page other than a Coveo search page or a page where there is not yet another Coveo search component (such as a standalone search box), you must include the Coveo JavaScript Search Framework resources in your page head.

Coveo JavaScript Search Framework 1.667.24 - July 2016  Get the latest Coveo JavaScript Search Framework (see Downloading).

<!-- Include the Coveo JavaScript Search Framework resources from CDN -->
<link rel="stylesheet" href="https://static.cloud.coveo.com/searchui/v2.3679/css/CoveoFullSearch.css" />
<script src="https://static.cloud.coveo.com/searchui/v2.3679/js/CoveoJsSearch.Lazy.min.js"></script>
<script src="https://static.cloud.coveo.com/searchui/v2.3679/js/templates/templates.js"></script>

What’s Next?

You must now add the Recommendation component HTML markup (see Integrating a Recommendation Component in a Website Page).