Black Tambourine (Posts tagged Personalization)

1.5M ratings
277k ratings

See, that’s what the app is perfect for.

Sounds perfect Wahhhh, I don’t wanna

Get the Personalized Datasource of a Sitecore Item

I recently came across a problem where i had to programmatically get the datasource of a View Rendering of a Sitecore item. This is a datasource that may potentially be personalised.

The method i put together requires the Item, the Placeholder name, and the Id of the View Rendering in this placeholder.

e.g. if I have a “Landing Page” item on my website, which has a “bottomPane” placeholder. This placeholder has a “Call To Action” View Rendering in it. The datasource for this View Rendering is personalised. Using this function i can get the datasource from this instance of the “Call to Action” widget for use elsewhere (in my case it was a navigation menu).

Example Usage: 

Here is the Class:

Sitecore Personalization Personalisation View Rendering Placeholder Datasource

Sitecore Personalisation Part 2 - Custom Content

So now that you can categorise your visitors (see Part 1), lets create content targeted at these.

In this example I have a Popular Links widget (i.e. sublayout control) on my Home Page that I want to have show different links for “Rate Payer” profile visitors.

1) Create two control datasources, one for default visitors and one for Rate Payers:

image

2) Open the Presentation Details of the item (in this example the Home Page) where you want to apply the personalisation. Click Edit, and then select the Controls tab:

image

Note: Items with existing rules against them will have a number on the icon.

3) Click on Personalize. Here you can add Conditions using the Rules Engine to set the Datasource. In this example i’ve set a default datasource, and a different datasource for visitors that have a Rates profile key value greater than 5.

image

4) Click New Condition to add a new Rule for a datasource. There are a number of options for Rules you can use:

image

5) Click OK and publish your changes. Here is what you see depending on who you are:

image
Sitecore Personalisation Personalization Rules Engine xDB

Sitecore Personalisation Part 1: Profile Setup

Sitecore’s analytics gathering has a lot of powerful features. This series of posts is going to try to explain the basics of configuring the personalisation features that come with Sitecore xDB (i.e. versions 7.5 and up).

Today I am going to talk about Profiles. Profiles are a way of categorising your site visitors, to allow for targeting these specific categories with personalised content. 

I’m going to be using a city council website as an example for these posts.

1) Sitecores personalization config sits under Sitecore\System\Marketing Control Panel\Profiles\

For this example we are going to keep it simple, so Create a new Profile called “Council Visitor Types”.

The structure in Sitecore has a Profile at the top level, then multiple Profile Keys, Profile Cards, and Pattern Cards under this. Here is an example:

image

2) The next step is to identify the different kinds of visitors to your site. Here are the categories of visitors for the council I’ve come up with:

- Local Business
- Ratepayer
- Senior Citizen
- Tourist
- Youth

In the context of Sitecore personalisation, each of these is a Pattern Card.

3) Create Pattern Cards for your visitor types. Note that each visitor can only be mapped to one Pattern Card at a time, based on the aggregate Profile Key values of their page visits (see next point). An example might be Senior Citizen Animal Owners. With a Pattern Card we can target users with a high score against the “Senior Citizen” and “Animal Owner” Profile Keys.

4) So how do we now figure out which Pattern Card a visitor should be mapped to based on their page visits? This is where Profile Keys and Profile Cards come in. Profile Keys are a way to categorise our content in a granular way. A Profile Card is a saved preset of multiple Key values, which are assigned to your page to categorise  its content. These might map one to one with your Pattern Cards.

An example of keys at the council; We have content on our website only relevant to Rate Payers. This content can be categorised as follows:

- Animal Ownership Registration
- Pay Rates Online
- Book a Swimming Pool Inspection
- Rubbish Collection Information

We also have some content that might be relevant to local Rate Payers, but could also be relevant to others visiting the site. e.g.

- Local Events
- Local Recreation Centres
- Aged Care Services

Now lets create a few for non-rate payers:

- Big Business
- Public Servants
- Retail Business

Each of these could be a Profile Key. Setup your keys to have a max value of 10.

Now create the Profile Card for Rate Payers, and edit the values for each Profile Key in this section:

image

In the previous example, “Pay Rates Online” is heavily related to a Rate Payer profile so we set a value of 10 for this. One visit to this content will heavily associate a visitor with this Card. For content that could fall under multiple cards we could use a low value e.g. Local Events could be a 5. For unrelated Profile Keys such as Big Business set the value to 0.

Do the same for each of your Profile Cards.

5) Assigning a Profile Card to a webpage / content item is the last step. Select the item in the Content Editor, then click on the Blue Man icon in the top right of the Content Editor UI.

Click on the Edit next to the Council Visitor Types Profile to open this popup:

image

Here we can assign one of our Profile Cards to this content, or by Clicking the Customize toggle we can assign custom Profile Key values for this content.

6) Do this for all your content and then publish your site.

Now when someone visits your site they will get assigned Profile Key values based on which of these pages they visit. If they only visit pages heavily tied to Rates Payers they will be categorized under this Pattern Card. This can change over time as they visit different content.


The next part of this series will explore how we can use Sitecores Rules Engine to personalise content based on a visitors Profile.

Sitecore Personalization Personalisation xDB Profile Card Profiles