Tag: Pattern Cards

Extending personalisation options using the SBOS Accelerator

A few weeks ago I blogged about extending profile matching over multiple visits in Sitecore. The basis of the post was to look at options on how you could extend Sitecore so that personalisation could use historical persona data rather than just data from the current session.

In this post I'm going to be looking at the SBOS Accelerators module which lists as one of its features "Historical Conditional Renderings".

So what does it do?

Rather than change the way data gets recorded about a user, the SBOS Accelerator adds an additional 5 personalization rules to the rule set editor. These are:

  • where the specific campaign has been triggered within x days
  • where the specific goal has been triggered within x days
  • where behaviour based on last x days matches the specific pattern card in the specific profile
  • where the specific page has been visited within x days
  • where the value of specific profile key compares to specific value, based on behaviour from last x days

As well as allowing a rule to look at profile data over a number of days, the days option can also be changed to look at profile data over a number of visits.

This option of allowing us to specify a number of days or a number of visits helps to overcome the issue of data needing to degrade at different rates over time. We can set rules to promote something that a user may still be interested in by limiting the data to the last week, or we can target personality traits that shouldn't change by taking a few months into consideration.

What's important to note though is profile data is still being recorded on a per visit basis, so we still don't have an overall accumulation of points over time and an assigned pattern card is still being based on an individual visit. But we're able to create rules based on pattern cards assigned in multiple visits.

Some things to note

The SBOS Accelerators are currently only available for Sitecore versions 6.6 - 7.2. It currently hasn't been updated to work with the new Mongo based analytics db in 7.5+.

The module has been written by Sitecore Support and is marked as being tested by Sitecore, so you can expect a decent level of reliability. However it is not covered by your Support agreement with Sitecore so you may not get any help with issues you encounter. The source for the module is available for you to edit though.

Links

SBOS Accelerators on the Sitecore Marketplace

Sitecore: Extend profile matching over multiple visits

In Sitecore, to gain a better understanding of our visitors interests we have the ability to define Profile Keys and Cards to tag our content with. As our visitors navigate through the site, this data is used by Sitecore to build a profile of the visitor. A pre-defined Pattern Card that most resembles the visitors profile is then assigned to the visitor which can be used as the basis of selecting the content that should be displayed on a page for that visitor.

However what this doesn't do is carry the visitors profile over multiple sessions. Each time a visitor comes back to the site within a new session, the visitors profile key values are reset back to zero.

So what's Sitecore actually doing?

Before working out how to carry this information between visits, lets look at how a profile is actually being created.

If we look in the Profiles table within the Analytics database we can see the profile data that’s been recorded for a visitors visit.

The Pattern Values column contains the current profile key scores for each key the visitor has a score for. e.g.

background=40;scope=50

If the visitor was to visit a page which has scope score of 5 and background score of 10 these values would be added to the visitors current key scores. e.g.

background=50;scope=55

When a pattern card is assigned, the card with the closest shape of keys is chosen. e.g. If the visitor has a high value for background and low value for scope they will be assigned a pattern card with similar proportional key values.

How do we extend this over multiple visits?

So the easiest way to carry the visit information from one visit to the next would be to simply copy the profile key values from the last session to the next. The code for this would look similar to the following:

1var currentVisitIndex = Tracker.CurrentVisit.VisitorVisitIndex;
2
3if (currentVisitIndex <= 1 || !Tracker.CurrentVisit.Profiles.Any())
4{
5 return;
6}
7
8var previousProfiles = Tracker.Visitor.GetVisit(currentVisitIndex - 1, VisitLoadOptions.All).Profiles;
9
10foreach (var profile in previousProfiles)
11{
12 var currentProfile = Tracker.CurrentVisit.GetOrCreateProfile(profile.ProfileName);
13
14 currentProfile.BeginEdit();
15
16 foreach (var ProfileKey in profile.Values)
17 {
18 currentProfile.Score(ProfileKey.Key, ProfileKey.Value);
19 }
20 currentProfile.UpdatePattern();
21
22 currentProfile.EndEdit();
23}

Now the visitors profile is how it was when they left and crucially we can use this data to personalize the sites homepage for the visitor.

So why shouldn't we do this?

As simple as this is, it comes with one potentially massive downside. If we go back to the way the profile values are built up they key values are essentially just being accumulated. Each time the visitor visits an item with a background score of 10, the visitors background profile key score in increased by 10.

Our visitors are humans going through different stages of there life, with constantly changing jobs and interests. There's nothing to ever reduce a profile keys score other than the fact everything is normally zeroed on each visit. By copying the data from the last visit on the start of the next this would never happen and the profile key's will continue to count up forever. The key value obtained from an item viewed 2 months ago would counted as just as important as the value from another key viewed on an item today.

So if you were running a travel site and a visitor looked at summer holidays for 3 weeks they will have a profile highly weighted towards summer holidays. If they then started to look at winter holidays we wouldn't want them to have to look at winter holidays for 3 weeks just to have an even likeness of summer and winter.

Overcoming this issue isn't so simple and largely depends on your business needs. If your visitors interests could change each week then you need something that will degrade the old visit data values quickly. Whereas if your trying to differentiate between people that are in a 2 week vs 6 month buying pattern, you need to retain that data a lot longer.

Some things we can do when copying the data from the visitors previous profile though could include:

  • Halving the profile scores, or reducing by a different factor. This would reduce the importance of values obtained on previous visits. So if a visitor received a 10 on the first visit, it would be worth 5 on the second, 2.5 on the third etc
  • Look at the date of the last visit. Is it to old to be relevant still or can we use the age to determine what factor we should reduce the scores by
  • Look at a combination of multiple last visits to establish what the recent scores were

All these ideas though need to be used on conjunction with what your trying to profile. If it's age then you know people are going to get older. If it's an interest that will change frequently then you know the data needs to degrade quickly, but if it's male/female then that doesn't necessarily need to degrade at all.