--- title: Use Sitecore personalization with Coveo slug: '2628' canonical_url: https://docs.coveo.com/en/2628/ collection: coveo-for-sitecore-v5 source_format: adoc --- # Use Sitecore personalization with Coveo > **Legacy feature** > > The Coveo Hive Framework is now in maintenance mode and is no longer recommended for new implementations. > > To build new search experiences, use one of Coveo's more modern, lightweight, and responsive libraries. > To get started, see the [Build search](https://docs.coveo.com/en/2473/) article. Customization lets you change a search interface by statically changing its look and feel. On the other hand, personalization lets you change a search interface dynamically based on some external conditions. For example, you may want your facets to appear and behave differently depending on: * The device that's currently being used. * The location of the current visitor. * The type of the current visitor (that is, its [Pattern card](https://doc.sitecore.com/xp/en/users/100/sitecore-experience-platform/pattern-cards.html)). ![Diagram explaining that a search interface can be transformed into a personalized search interface using data such as the device](https://docs.coveo.com/en/assets/images/c4sc-v5/32604801.png) This page covers how you can dynamically change the look and feel of a component based on external conditions. The use cases below illustrate how you can use Sitecore personalization with Coveo. Most of the content below assumes you're using the [Coveo Hive framework](https://docs.coveo.com/en/2214/). Each example builds on the previous one, so ensure you complete all of them in order. > **Important** > > Component personalization is a Sitecore feature. > Sitecore personalization rules are based on events recorded in the Sitecore Experience Database (xDB). > > Coveo-powered search interface events aren't recorded in the xDB out of the box. > Coveo-powered search interfaces record and send event analytics to the [Coveo Platform](https://docs.coveo.com/en/186/). > When using the [Coveo Hive framework](https://docs.coveo.com/en/2214/), you can send a copy of these search interface event analytics to the xDB by adding the [**Coveo Send Analytics to Sitecore**](https://docs.coveo.com/en/2479/) rendering to your search interface. > > Also note that Sitecore processes personalization rules server side, whereas Coveo events that update a search interface (for example, a search query) occur client side. Sitecore doesn't reprocess personalization rules upon a Coveo-powered search page client-side event. ## Hiding a component based on specific conditions You can hide a **Coveo Facet** component whenever you're using a mobile device. . Open your Coveo-powered search page in the **Experience Editor**. . Select the **Coveo Facet** component. . In the floating toolbar, select the **Create or edit personalization for this component** option. ![Screenshot of the Coveo Facet component floating toolbar with the user clicking the Create or edit personalization for this component button](https://docs.coveo.com/en/assets/images/c4sc-v5/personalize-1.png) . In the **Personalize the component** dialog, click the **Add personalization rule** `+` sign button. . Name your rule `Hidden on Mobile`. . Choose **Edit rule**. ![Screenshot of the Personalize the component dialog | Coveo](https://docs.coveo.com/en/assets/images/c4sc-v5/personalize-2.png) . In the **Rule Set Editor** dialog, among the **Device** rules, choose `where device type is value` and set the `value` to `Mobile Phone`. Click **OK**. . Back in the **Personalize the component** dialog, check **Hide**. . Choose **OK**. . In the **Coveo Facet** floating toolbar, choose the **Hidden on Mobile** condition. . Validate that your **Coveo Facet** component is now hidden. ![Screenshot of the Sitecore Experience Editor with the Coveo Facet hidden and its floating toolbar showing Hidden on mobile | Coveo](https://docs.coveo.com/en/assets/images/c4sc-v5/personalize-3.png) ## Changing component parameters based on specific conditions Here is how you can change the parameters of a [**Coveo Facet**](https://docs.coveo.com/en/3027/) component whenever you're using a mobile device. By doing so, you're modifying the condition that you created in the previous section. ### Step 1: Create a facet parameters item To create a facet parameters item, see [Data source branch templates](https://docs.coveo.com/en/2878/) and [Add related controls](https://docs.coveo.com/en/2506#add-other-components). ### Step 2: Create a condition that uses your new facet parameters item . Open your Coveo-powered search page in the **Experience Editor**. . Select the **Coveo Facet** rendering. . In the floating toolbar, select the **Create or edit personalization for this component** option. . In the **Personalize the component** dialog, change the name of the `Hidden on Mobile` condition for `Customized Parameters`. . Select the **Show** option. . Under **Content**, select **...** next to the field. ![Screenshot of the Sitecore Personalize the component dialog with the user clicking the Content field ellipsis button | Coveo](https://docs.coveo.com/en/assets/images/c4sc-v5/personalize-4.png) . In the **Select the Associated Content** dialog, create a new data source called `Coveo Facet For Mobile`. Click **OK**. . Back in the **Personalize the Component** dialog, choose **OK**. . In the **Coveo Facet** floating toolbar, choose the `Customized Parameters` condition. . In the **Coveo Facet** floating toolbar, select the **Edit the rendering's data source option**. This should be the leftmost option in the toolbar. This will open the `Coveo Facet For Mobile` data source you just created. . In the `Field` field, select the field your facet usually targets. . Set the `Number of values` field value to `3`. . Validate that your **Coveo Facet** rendering now displays only three values when the `Customized Parameters` condition is selected. ![Screenshot of the Sitecore Experience Editor with the Coveo Facet displaying 3 values and its floating toolbar showing Customized parameters | Coveo](https://docs.coveo.com/en/assets/images/c4sc-v5/personalize-5.png) ## Personalizing a component based on the current visitor In addition to the device detection rules that we used in the previous examples, you can also use xDB **Visit** rules. ![Screenshot of the Sitecore rule editor showing the Visit rules](https://docs.coveo.com/en/assets/images/c4sc-v5/personalize-6.png) This means that, depending on the Pattern Card associated with the current visitor, you can change the appearance and properties of your components. ## Personalizing based on the search term using Coveo conditional renderings rules Where Sitecore offers various personalization rules to change the way your website looks to your visitors, Coveo for Sitecore offers similar rules based on queries. > **Important** > > Sitecore processes personalization rules based on data in the Sitecore Experience Database (xDB). > However, search queries are analytics events recorded by Coveo and sent to the [Coveo Platform](https://docs.coveo.com/en/186/). > When using the [Coveo Hive framework](https://docs.coveo.com/en/2214/), you can send a copy of Coveo search query analytics to the xDB by adding the [**Coveo Send Analytics to Sitecore**](https://docs.coveo.com/en/2479/) rendering to your search interface. On any Sitecore presentation item, you can configure personalization rules. Coveo adds one of them in the **Coveo Conditional Renderings** section. Look for the condition named `when the current visitor previously performed a query that compares to specific value`. ![Screenshot of the Sitecore rule editor showing the Coveo Conditional Renderings section | Coveo](https://docs.coveo.com/en/assets/images/c4sc-v5/personalize-7.png) You can add this condition to your component by specifying an operator and a value. ![Screenshot of the Sitecore Personalize the component window with a rule configured to show the component when the current visitor previously performed a query that contains the word toyota](https://docs.coveo.com/en/assets/images/c4sc-v5/personalize-8.png) Finally, you can specify your own component under **Personalize Content** so that you're able to change the way your component looks, depending on the query that was run. ### Example use case You have a website to sell cars. Each car model has its dedicated page, and you would like to display a different layout for these individual pages depending on what the user is interested in. For example, if a user has been actively searching for Toyota models and ends up on a particular Toyota model, you want to change the layout of this page so that additional Toyota models are suggested on the side of the page, say, in a carousel component. Given the Sitecore Experience Database is enabled, you can edit the personalization options of the carousel component located on the Toyota Corolla page, and add a Coveo Conditional Renderings rule that uses your query history to conditionally display another version of your carousel that only contains Toyota models. To summarize, this means that when a visitor performs a query for `toyota` and then clicks one of the search results, the page associated with this specific search result (some specific Toyota model) changes according to their query history.