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 page view events (see Logging Page 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 of the properties you may want to change:
UseCountry: if you want to boost search according to the user country.
UseProfileCards: disable this option when you are not using Sitecore Profile Cards.
- EnableContextPipeline: disable this option if you do not intend to have custom processors modifying the context.
CustomContext: If you plan on having multiple contexts, you need to add your static values here.
Click OK to close the Device Editor box, and OK again to close the Layout Details box.