Inserting and Customizing a User Context Component Using the Coveo for Sitecore Legacy Search UI Framework

Coveo for Sitecore (January 2017) Cloud only Coveo for Sitecore 4.1 (November 2018)

The User Context component can be integrated to any page and provides a context to enhance the Search, Related Query, and Recommendations components.

Adding the Coveo User Context Component

  1. Ensure that your website is currently logging view events (see Logging View Events)
  2. Open the Sitecore Content Editor, and in the navigation tree, click your item.
  3. In the Presentation tab, click Details.
  4. In the Layout Details dialog:
    1. Under Default, click Edit.
    2. In the Controls tab, click Add.
    3. In the Select a Rendering dialog:
    4. Add the Coveo Page View Analytics Component:
      1. For Web Forms, the component is located under Sublayouts > Coveo, and is called Coveo User Context.
      2. For MVC, the component is located under Renderings > Coveo, and is called Coveo User Context View.
    5. In Add to Placeholder, enter the name of one of your placeholders.
    6. Click Select.
  5. In the Control Properties dialog box, enter your desired properties. Here are some properties you may want to change:

    To learn more about the various properties of the User Context component, see User Context Component Properties.

    1. UseCountry: if you want to boost search according to the user country.

    2. UseProfileCards: disable this option when you’re not using Sitecore Profile Cards.

    3. EnableContextPipeline: disable this option if you don’t intend to have custom processors modifying the context.
    4. CustomContext: If you plan on having many contexts, you need to add your static values here.

      To help you choose what could be useful for you, see Leveraging User Context for Coveo Machine Learning.

  6. Click OK to close the Device Editor box, and OK again to close the Layout Details box.