.NET Daily

How to personalize based on search engine keywords with Sitecore




Darius Dumitrescu is a creative Senior CMS Consultant with in depth .NET knowledge, focused on Web Development and Architecture Design.


How to solve: An expression tree may not contain a dynamic operation – ASP.NET Core 06th July, 2019

How to use DbContext Scaffold to add only selected tables – ASP.NET Core 01st July, 2019


How to personalize based on search engine keywords with Sitecore

Posted on .

Offering an unique journey for the customers on your website is a must by today’s web standards. By using Sitecore, you have access to dozens of personalization capabilities that you can use on a properly developed solution.

Below I’m going to show you how to personalize your homepage experience based on the search engine keywords.

Setting up the personalization rule

Adding the personalization rule is quite easy to do. You need to select the component you want to personalize, then you need to click the personalization icon. You can see how it looks like in the picture below:
Sitecore personalization icon

Next, do the following steps to set up the condition:

  1. Click on the Plus sign on the top right corner of the page, then you need to give it a name.
  2. Click on the Edit button and from there, type the search keywords in the search bar.
  3. Choose the where the search keywords compares to specific value condition, input the word you want to match in the search query and lastly choose the “contains” comparison criteria.

NOTE: You might want to use here the contain criteria because quite often search queries have more than one word but of course you would want the broadest match.

In the image from below you can see the personalization rule I have created:

sitecore search engine personalization rule

As a final step, you need to save and publish the component.

Testing the personalization Rule

Well, testing this is a different story. Because usually these rules are setup in a closed environment, you cannot just search for the website name plus the keyword on Google and expect to find it in the results section.

For testing, I personally use a Chrome extension called Referer Control. It’s really neat and it gets the job done.

I will not write here how to use it. I want just to show you the rule that I setup because it’s pretty straightforward:

Chrome referer control rule

Once you configure the right referer in the URL, you can then access your website and see if the component that you personalized appears in the page as it should.

But first, it is important to delete any cookies for the website you are testing because that marks the beginning of the session. If any cookies already exists on the website, the test will not work.

In order to check in browser if the search engine is really applied as a referrer, you need to open developer tools, select the loaded page from the Network tab and check in the Referer field from Headers tab if you have the right parameter.

The image from below shows how the field is populated on my side.

search engine referral

What Search Engine Websites are Supported

  1. Google
  2. Bing
  3. Yahoo
  4. Lycos
  5. Baidu

But if you want to add more websites as a referer, you can add new ones on the following config file from Sitecore:


The section in the file is called: parseReferrer

I hope the information is useful to you and please let me know about any scenarios you want to try with this personalization rule.



Darius Dumitrescu is a creative Senior CMS Consultant with in depth .NET knowledge, focused on Web Development and Architecture Design.

  • user

    AUTHOR Aackose

    Posted on 5:15 pm March 3, 2018.

    Hi Darius,

    Were you able to test this rule?

    After google removing the keywords in the referrer object, due to privacy reasons back in 2012, i doubt if we can use this rule. The referrer will now show ‘https://www.google.com/’. The same is the case with Yahoo & Bing as well.

  • user

    AUTHOR Darius

    Posted on 7:17 pm March 3, 2018.

    Hi Aackose,

    I haven’t got the chance to test this rule after Google change but somebody from Sitecore told me that the rule can still be used if the website owner is affiliated to Google Adwords.


  • This site uses Akismet to reduce spam. Learn how your comment data is processed.

    View Comments (2) ...