Sitecore Basics- Introduction to Personalization

The scope of this blog post is to give an idea about personalization in Sitecore, why it’s required and steps to create  and configure personalization for the components, this is for beginners who are trying to understand the concept and how it can be implemented.

Personalization enables you to deliver targeted content to your visitors. For example, you can implement rules that show personalized content to visitors based on their browsing behavior and their accumulated profile values.
This is really important as you don’t want to show something to users which really doesn’t makes any sense to them.

Sitecore-Personalization

As an example- For an e-Commerce application as an business you want to show relevant information to users to get most of the conversions, this depends on number of factors, some of them includes:

  • User behavior
  • Location
  • Goals users have triggered.
  • Anonymous Vs Logged in users
  • Based on Subscription
  • Showing different banner images.

Sitecore XP lets you choose from several personalization approaches:

  1. Rules-based personalization: You define the conditions under which content is delivered to a customer. For example, you can set rules based on the IP address or physical location of your visitors, the keywords they use to reach your site, their mobile device, or the goals that they achieve on your website to determine the content that is displayed.
  2. Adaptive personalization- Use visitor profiles and pattern-card matching to dynamically adapt the content shown to visitors in real time. You can set adaptive personalization rules in Sitecore XP’s Rules Set Editor.
  3. Historical personalization: You can set rules that personalize content based on a contact’s historical or past behavior, rather than their actions from the current session (after all, context is what comes before and after the present).
  4. Test and then personalize: With Sitecore XP, you can use A/B and multivariate testing to assess your content and use the test results to optimize for conversion rates against your site’s goals. You can also use testing to assess which type of content works best with certain segments of your visitors.
  5. Journey-based personalization: Design user journeys with Sitecore XP using advanced business logic, and use them to help assess where your customers are in their journey with your brand. Then you can use triggers to advance them through their journeys in context of how far along they are.

We use Rule set editor (https://doc.sitecore.net/sitecore_experience_platform/digital_marketing/personalization/the_rule_set_editor ) to set the rules and action to perform and configure personalization for the individual components.

There are several out of the box categories which we can use to personalize the components, which includes:

  1. Campaigns
  2. Channels
  3. Date
  4. Device
  5. Fields
  6. GeoIP
  7. Tracking
  8. Visit and etc.

Personalizing the Component:

In order to personalize the component we have to make sure that the component which you are targeting to personalize should support datasource, this would help us in assigning different contents based on different criteria set.

Here are the steps to configure personalization for specific component(s):

  1. Select the component that you want to personalize, you can select the component either from presentation or from Experience editor.Personalization-1
  2. Select the component and click on Personalize button.
  3. Click on the “New Condition” button and add the rule which you want to add based on the requirement.
  4. Click on Edit button and add the rule.Personalization-2
  5. As an example- i am adding the rule which is based on field name compares to specific value.Personalization-3
  6. We can also define the default or fallback component datasource, if none of the conditions matches the default will be used.Personalization-4
  7. Once the configurations are done on the component, we can see an indicator in the presentation which shows that personalization has been applied to the specific rendering/component.Personalization-5
  8. We can personalize the component from experience editor as well.Personalization-6
  9. Now based on the condition which is added on the component, related content will be rendered else the default content will be displayed.

 

Custom Personalization:

There are certain scenarios where out of the box personalization which are available are not enough to handle the business scenarios, in those cases we have to think about creating custom personalization rules.

We need to create a class that inherits from Sitecore.Rules.Context and implement the Execute() method,and this is where all the business rule exits for the custom rule. We will be covering in a separate blog post about how to create custom personalization rule and applying it on the renderings.

Hope this helps.

Happy learning and wish you all a very Happy New Year 2018 🙂

References:

https://www.sitecore.net/solutions/personalization-segmentation

https://doc.sitecore.net/sitecore_experience_platform/digital_marketing/personalization

Advertisements

Introduction of MongoDB with Sitecore

Introduction of MongoDB with Sitecore

VIDEO:

Presentation Deck:

 

For more details, please visit : http://sitecoreug.org/en/usergroups/bangalore-sitecore-user-group/events/march-2017-3/

Happy learning 🙂

Sitecore best practice and guidelines

There are several useful articles and blogs about #Sitecore best practices, but I am trying to put together my learning on this area. Sitecore has different components shipped within it i.e “analytics“, “workflows“,”personalization” and others.

Before starting or working on any application, our main focus should be to understand application as a whole and not just part of it, believe me this is a key for overall success of your implementation, try to get involved and get more and more information about the solution as a whole.Once you have a big picture in mind, it’s easy to work on small features and then for integrations.

There are several categories we can have, when we talk about Sitecore best practices:

  1. Template.
  2. Content structure.
  3. Presentation.

Templates: Templates are the base for any Sitecore implementation, templates are grouping of certain fields that make one entity/table in Sitecore, which can have one or more then one field(s). There are few things which we should consider while designing a template.

  • Think about the entity first and all related fields which can be grouped.
  • List down all the fields which needs to be added to a particular entity.
  • Now identity if there are any set of fields which are common to other entities as well, at least to few, if not all, like “Headline”,”Teaser”, “Main Content” or “Image” fields.
  • If you get a list of common fields, then create a new “Base Template” and add all those fields in that template, this is also to make sure we are reusing the template and fields as much as possible.
  • You can use the “Display Name” property to provide a user-friendly name for any item.
  • Always try to group fields in section, this is logic separation of fields, still all the fields comes under same template only.
  • Try to give user friendly name for all sections,fields and templates so that business users/content authors can identify and understand them easily.
  • Always set default values in standard values of template, so that we can prepopulate some of the field values.
  • If there is predefined structure we have to follow, we should always consider branching template, this really helps content authors and they will love you for this.
  • Try to have unique icon added to you template, so that it is easy to recognize.
  • Presentation should be configured in standard values, so that it can be applied to all instances of that template.
  • Creation of “Base Templates” should always be in your radar, so that you can make use of Sitecore inheritance where required.

Content structure: This is the second step where we create items based on the template created, content structure helps content authors to look for the information or details they are interested, here are some of the things that we should consider while creating/designing content structure.

  • As a standard, try not to have more than 100 items under particular node, can be folder or page item, this can impact Sitecore performance.
  • If expecting more than 100, then consider using buckets or if not buckets create folders in a way that it doesn’t exceed more then 100 child per folder/item.
  • Try to have only page items created under home page, this can change, you can read my blog on different options for configuring content tree https://ankitjoshi2409.wordpress.com/2017/02/07/structuring-and-organizing-sitecore-content-in-content-tree/
  • Plan content structure based on site map, place all the items which are accessed using URL as descendants of the website, we should mimic sitemap structure in sitemap as well.
  • Make sure we have security added for items which which should not be accessed by specific user role(s).
  • Indexes should be configured for automatic updates,for better and faster content editor experience.
  • Make sure to consider multi-site environment as well, and create folder accordingly, this also helps in content sharing from one site to another.
  • Try to create folder template for structuring page items, should try for it as much as possible so that we have more control on the tree.
  • Maintain only a few versions of each item in the implementation- this is to improve the performance.

Presentation : Some of the things to consider while setting up the presentation:

  • Page should be Experience editor friendly.
  • Make sure to use Experience editor friendly tags like
  • Sublayout(s) and Rendering(s) should be configured to be cachable for better browsing experience.
  • Rendering should be added to page template standard values,when applied at an item level, any changes to the layouts require a lot of effort to make changes to all items. When applied at standard values, such modifications become easier.
  • Any updates to the specific should be done directly on final layouts, please read my blog for more details- https://ankitjoshi2409.wordpress.com/2017/02/06/sitecore-shared-vs-final-layouts/
  • Rendering should have data source template and data source location defined, this helps personalizing the site and making sure the application is experience editor friendly, this is important configuration for Experience editor.
  • All the components/rendering(s) should have thumbnail image added to it, this helps CAs configuring dealing experience editor nicely.
  • Use placeholders settings and allowed control setting, so that CAs can add/create only those modules which are required for that page design to work.

General Practice:

  • Don’t allow a single template to contain two fields with the same name.
  • Use a source code management system to manage all code,this includes JavaScript and CSS as well.
  • Avoid hard-coding as much as possible so that we don’t have to update the code, if any change required.
  • Use IDs instead of paths/name whenever possible.
  • Avoid using any form of the descendant axix, like GetDescendents
  • Try not to modify Sitecore base files and use Sitecore patching for any updates to config files, this helps in upgrade process if required.
  • Content Editing should be done on the master database, and then pushed to web database.
  • Restrict access to content delivery servers.
  • Use the general best practices of developments applicable to C# with tools like Re-sharper.
  • Set up continuous integration.

As I mentioned before there are lot of articles that has more details on best practices and guidelines, please make sure to read those as well.

I hope this will give you some degree of information, which can be applied while designing any structuring your Sitecore site.

Please feel free to add feedback and comments, happy to discuss more.

Happy learning 🙂

Sitecore | Shared vs Final layouts

One of the new features of Sitecore 8 is the introduction of versioned layouts.

Language Version Layouts give content editors the ability to create different layout definitions for each language version for an item. In Sitecore 8 there is now a Shared Layout and a Final Layout tab in the presentation details dialogue of an item. This is where the magic for the versioning is configured.

The Shared Layout section stores the renderings that are shared across all language versions of an item, while the Final Layout section, stores the renderings that are specific to the current language version you are editing. The Final Layout details panel displays the final combination of presentation details, and determines what is rendered when viewing the current version of the item.

imagelayout

This new feature allows Sitecore users to design and market pages based on different languages. Content editors can now not only update the datasource on a component based on personalization rules, but can also present a different layout structure, including or removing components per language version.

This gives the content editor and marketing team a wider range of variations. If a multi-language site has a different marketing plan or promotional offers based on the language, marketers are no longer restricted to rendering the same components for all languages. The language version layouts open many doors for a customized user experience.

There are however some things that Sitecore users need to remember about this new tool. Currently there isn’t a way to update the shared layouts field from the Experience Editor.

***********************************************************************

Question : What layout do you modify when you edit a page in Experience Editor?

Answer: Final Layout

Before Sitecore 8 regardless of item or language version, it used to update the shared layout,as there was no final layout present.when we open a page item we basically create a delta against page template, and will be presented with the page layout with the delta merged which gets updated to _Renderings field.

From Sitecore 8, we still create delta of what we have in the page template, but the page layout will be presented and updated to _Final Renderings field, which is versioned per language.

Please share your feedback and comments, as how we can make this a great learning platform, much appreciated.

Happy learning 🙂