According https://doc.sitecore.com/en/users/101/sitecore-experience-platform/the-personalization-conditions.html, there are many personalization rules that are still available in Sitecore XM.

My question is simply - can you still create custom Personalization rules in Sitecore XM, provided the custom rules do not read any Analytics/Xdb data?


2 Answers 2


To start with custom personalization, you need to perform the below steps:

Step 1: Go to the path /sitecore/system/Settings/Rules/Definitions/Tags right-click on Tags and add new customize Tag (I have given name CustomPersonalization):

enter image description here

Step 2: Go to the path /sitecore/system/Settings/Rules/Conditional Renderings and expand conditional rendering and add created tag into the Tags property of default tag as below:

enter image description here

Step 3: Go to the path /sitecore/system/Settings/Rules/Definitions/Elements

  • Right-click on Elements and add new Element folder (I have given the name CustomPersonalization).

  • Right-click on CustomPersonalization and add new condition and set the Text and Type property of condition.

    Text Property: Give the condition with Rule which will show to the content editor.

    Type Property: Specify our class name with a namespace followed by the assembly name, where we will write our personalization rule business logic.

enter image description here

Step 4: Now you need to add created tag into default tag, Tags property of element folder:

enter image description here

Step 5: Write your personalization rule business logic as below or update your code as per requirement:

public class PersonaliseRuleService<T> : StringOperatorCondition<T> where T : RuleContext
        public string Value { get; set; }
        protected override bool Execute(T ruleContext)
            Assert.ArgumentNotNull(ruleContext, "ruleContext");
            HttpCookie customCookie = HttpContext.Current.Request.Cookies["Custom_Personalization"];      
        if (Value.ToLower().Equals(customCookie.Value.ToLower()))
                return true;
            return false;

Step 6: After completion of all the above changes, you need to set your personalization rule on the component using experience editor. Go to the page presentation details and select that rendering and click on personalize section. Add your personalization rule and select Edit rule then select our created rule and update the data source from the content property.

enter image description here

enter image description here

enter image description here

Same you can create a more custom rule to show relevant content to the visitor. For more details blog post:

  1. Work with Custom Facet in Sitecore
  2. Custom Personalization Rules in Sitecore

Yes this is absolutely possible. Make sure you have Xdb.Enabled set to false to have xDB off but Xdb.Tracking.Enabled to true so the rules work, below sample patch file:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/" xmlns:role="http://www.sitecore.net/xmlconfig/role/">
      <setting name="Xdb.Enabled" >
        <patch:attribute name="value" value="false" />
      <setting name="Xdb.Tracking.Enabled">
        <patch:attribute name="value" value="true" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.