Inserting and Customizing a User Context Component Using the Coveo for Sitecore Legacy Search UI Framework
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
- Ensure that your website is currently logging view events (see Logging View Events)
- Open the Sitecore Content Editor, and in the navigation tree, click your item.
- In the Presentation tab, click Details.
- In the Layout Details dialog:
- Under Default, click Edit.
- In the Controls tab, click Add.
- In the Select a Rendering dialog:
- Add the Coveo Page View Analytics Component:
- For Web Forms, the component is located under Sublayouts > Coveo, and is called Coveo User Context.
- For MVC, the component is located under Renderings > Coveo, and is called Coveo User Context View.
- In Add to Placeholder, enter the name of one of your placeholders.
- Click Select.
-
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.
-
UseCountry: if you want to boost search according to the user country.
-
UseProfileCards: disable this option when you’re not using Sitecore Profile Cards.
- EnableContextPipeline: disable this option if you don’t intend to have custom processors modifying the context.
-
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.
-
- Click OK to close the Device Editor box, and OK again to close the Layout Details box.