Starting with personalization in Kentico EMS

Starting with personalization in Kentico EMS

Setting up personalization in Kentico EMS is a little easier and less development focused as in Kentico Cloud. That means you can setup some very cool personalization effects with little effort and some basic knowledge of Kentico.

I will show you how to setup 3 simple personalizations. This is a great example to see how to start.

Menu personalization

There are few ways to hide menu items like membership or security, but we will use personalization, because this example can be an inspiration on how to personalize other listing items.

By default, Kentico's sample Dancing Goat website has the following links in the header:

We're going to limit the visibility of some links to the anonymous users, and allow signed-in users to access all available links. Let's say that we want anonymous users to see only the following links: Home, Store, Articles, About Us and Contact. First, we're going to hide the last two links (Cafes and Partnership), and after that we'll add a personalization variant which will show a full navigation to the signed-in user.

To limit the number of visible links:

Step 1

On the Master page, click on the Design tab, and after that click the menu icon of the web part named MENU > click Configure in the dropdown menu

In the configuration menu, find the Select top N pages field, write 5 and click the Save & Close button. Results can be seen in the picture below:

Now we want to add a personalization variant which will show a full navigation to the signed-in user:

Step 2

On the Master page, click the menu icon of the web part called MENU > click Personalization variants > Add web part variant

On the next screen, you must specify the Display name and Display condition for this variant. I've decided to name it 'Show/hide links'.

After you name the variant, click the Edit button next to the Display condition field. A new window will open: here we will specify under which condition(s) this variant will be displayed. 

On the right side, find the rule named Current user is logged in and click the arrow to add it to the left area. After that, click the Save & Close button to close the Rules window and again Save & Close button to close the Personalization variant window.

After you close the previous windows, a new one will pop up – it's the same window (webpart configuration) as the one from the step 1, where we limited the number of visible links. The only difference is that this time we're configuring the web part properties for this specific variant. Since we want to allow signed-in users to see all available links, again find the Select top N pages field and delete the 5 from the field, which will leave it empty – this means that all links will become visible. After that, click the Save & Close button.

That's it. You can test this personalization variant by simply signing in and out of the page.

Welcome back message

A message will be displayed if the visitor returns to the site, which is based on the web analytics criteria. First, we're going to create a new zone where we'll place the message.

On the Master page, click on the Design tab and open the page template by double-clicking on the green ribbon above the header.

Add the following code in the editor, wherever you want to place the message. You can see my placement in the picture below. Also, you can replace 'ZoneUserGreeting' with whatever name you like. After that, click Save & Close.

<div>
<cms:CMSWebPartZone ZoneID="ZoneUserGreeting" runat="server" />
</div>

Right click on your new zone's yellow ribbon and Add new web part and select Editable region from Text & Images. Now open the Page tab and add the message "Welcome back! :)" and click Save.

Our next step is to setup a personalization variant. Right click on our editable text web part and select Personalization variants… > Add web part variant.

Again, specify the variant's display name and after that click on the Edit button next to the Display condition field.

On the right side, find the rule named Visitor has arrived on the website for the first time and add it to the left side by clicking on the arrow icon.

Click the Save & Close button in the current and following window, until you get to the Web part zone properties window, just like in part 1. Once there, go to the 'Visibility' section and check the 'Visible' checkbox.
Now we'll have a simple little message if the visitor returns to the site. As we've already mentioned, this variant has a rule which is based on web analytics criteria, so you might not see the message as soon as you open/close the website or the browser. This is how it looks:

Feel free to play around with this example, like adding message for first time visitors ‘First time here, welcome’. You don’t need to hide message for first time visitors… :)

Shopping cart reminder

Let's remind users that they have items in the shopping cart. Kentico has already provided us with a nice notification bubble next to the shopping cart icon, so we just need to modify the text based on the personalization variant.

Since Kentico already includes a few variants for this bubble, we need to add a new one by clicking on the '+' icon, as shown below:

After that, you'll see a familiar window in which we need to set up the variant display name and click on the Edit button to add a new rule. This time we'll select the rule named Visitor has at least X products in the shopping cart.

Now, on the left side you'll see that some words are underlined – this means that we can click on them and fine-tune our rules. Click on the enter number and enter any number you like. I have chose number 1, meaning that visitor will see this reminder if he has at least 1 item in the shopping cart.

Again, click the Save & Close button in the current and following window until you get to the Web part properties window. Here we will simply change the Default text under the Content section. Delete the current text and write anything you like. I wrote "Hello! You have some items in your shopping cart."

After clicking the Save & Close button, we can head out to our page and see if we can get this new message shown. Visit the shop and try to add some product in the cart – as soon as you add it, you should see your message in the bubble, like this:

Conclusion

As you can see starting with personalization in Kentico EMS is easy. It requires some creativity and few technical skills. The main goal is to start small and not overdo it.