Tailwind Logo

Personalization using history of previous visits

Experience Platform (XP)

Published: 2022-05-24

Sitecore XP's personalization feature provides several rules for configuring personalization based on the history of the visitor's behavior when browsing to a page. In this article, we will explain how to configure each of these rules and how they work.

Check the rules for the page

Narrowing down to the rules on the page will show some rules as follows.

personalize01.png

In this article, we will introduce two of these rules.

If you visit a specific page

Among the rules, try to set the following rules

  • (Page) When you visit a specific page

The following is a screen that specifies the pages on the site as pages and the content to be displayed.

personalize02.png

Once the settings are complete, publish the item. If you have set up a workflow, complete the workflow and publish the item. Now let's check to see if the personalization is executed and the page about the meal is displayed when you browse to a specific page.

personalize03.gif

Personalization will take place, but once you close your browser, you will be returned to standard content. In other words, please understand that when using this rule, you can use it to refer to the page you are currently visiting.

Past and present interactions

So how can we set up a page event to say that a page was viewed, including past visits? In this case, you can create a page event and assign that event to the target page, so that when the page is viewed, the page event is recorded and the results can be used to personalize the page.

The rules include the following items

  • If a specific page event was triggered in a past or current interaction, and if the number of days elapsed compares to the number, and if the number of past interactions compares to the number

This is what we will use in this case. The first step is to create a page event. The item is created under /sitecore/system/Settings/Analytics/Page Events where you add your Sitecore analytics settings.

personalize04.png

In this case, we will create an item called Personalize Test.

personalize05.png

Creating an item alone does not make it valid; you must perform a workflow placement.

personalize06.png

The page event has now been created.

Then select the item for which you want to set the browsing history, as the page event must be executed when the page is viewed. This time, specify in the content editor the item that has been specified for the previous page, and select the Analytics - Attributes item from the menu.

personalize07.png

When the dialog opens, there is an Events tab that allows you to select the `Personalization Test` that you just created. Check this to complete the workflow for the page you have configured.

The previous steps have resulted in the publication of page events and pages that have been configured. Finally, create a rule. As before, open the Rules screen for personalization.

personalize08.png

This time, for testing purposes, we will change the content to be displayed when a different rule is hit than the previous one.

personalize09.png

Complete the publishing process for the item whose settings have been changed and check its operation. We would like to use Experience Explorer for the operation check. The startup procedure is as follows

  • Open the Experience Editor
  • Open Home tab
  • Switch to Explorer mode
personalize10.gif

In Explorer mode, you can set goals and events. If you open the panel closed on the right, by default there are no page events, as shown below.

personalize11.png

If you open a page that has page events set up, you will see that data is given to the page events.

personalize12.png

Returning to the home page, you will notice that the content has changed to Fitness.

personalize13.png

Operation check is complete. All that remains is to publish the relevant items to complete the personalization setup. The key point this time is that the personalization will change according to the duration and number of visits set in the rule. A page visit is only for that session, but to go beyond that, a page event will be used.

Summary

We have presented the steps for performing personalization using page browsing history. Both are similar, but the difference in operation is whether to target only during the visit or also the history of past actions.

Tags