3

Using OOTB Sitecore functionality: I have a bucket of video items, when a visitor views a video we have a control for them to say whether they like or dislike the video.

What would be the best way to store this information with the intention of being able to generate the following results:

  1. Create a list of the most liked videos in ranked order.
  2. Be able to identify trends (e.g. current user likes certain tags).
  3. Be able to profile users by videos they liked (e.g. they liked these 5 videos so we can predict they'll like these ones).
  4. Keep a history of videos a user has seen so future suggestions aren't repeated.
4

Your list though simple, goes several different directions. Lets cover this at a high level and maybe ask questions for each one to get a more detailed answer.

Sitecore xDB is configurable and extendable. Its what makes it so powerful. You can accomplish all of this using xDB and a little bit of code.

Create a list of the most liked videos in ranked order.

You can think of this the same way you think of how Sitecore keeps track of search terms people have entered. Page Events are your best friend in this case. Create a new page event for Video's watched an fire that event from code. Maybe even client side via an API.

https://doc.sitecore.net/sitecore_experience_platform/developing/marketing_operations/events/register_a_page_event_programmatically

You call up the videos watched page event and put the video on the data of the event.

var interaction = Tracker.Current.Session.Interaction;

var pageEventData = new PageEventData(name, definitionId)
{
    ItemId = itemId,
    Data = [Video ID, or Name, or Url],
    Text = text
};

interaction.CurrentPage.Register(pageEventData);

Then you will want to add the report of your top videos to experience analytics. This will require creating a dimension from your page event and create a new report using Speak in the experience analytics. This a great how to, to get you started on creating the dimension and the custom report by copying an existing one. https://community.sitecore.net/developers/f/9/t/127

Be able to identify trends (e.g. current user likes certain tags).

This would be the same as above. Just a different page event for the video tag. You could then see, in the last 7 days certain tags have been more popular than others.

Be able to profile users by videos they liked (e.g. they liked these 5 videos so we can predict they'll like these ones).

This is will be handled by profile and patterns cards in Analytics. You will want to make a new profile card for your video and add profiles for each tag you want to offer. Then you will want to make pattern cards for how you want organize your video users.

And example of this would be to create profiles for cars, computers, watercraft and hot air balloon. Then create pattern cards for cars, water, inside and outside. Notice that its not one to one with your profiles. It could be anything you like. Then score the pattern cards to place users in the appropriate patter. And example is that Cars pattern would be a 5 for cars, 0 watercraft, 0 inside, and 2 outside.

When the user gets votes on 3 or more (it's Sitecore setting) video, the video that vote on will trigger them to be put into a pattern card there profile scores line up with.

I wrote a good answer (my opinion :) ) in this answer how profiles work.

Behavioral personalization?

After you have scored your user, you can then personalize their experience by offering them videos based on the pattern they are in. If they are in the outside pattern, you offer video that are tagged as cars and watercraft. You can certainly tailor your profiles and patterns to get you the spread you need.

Keep a history of videos a user has seen so future suggestions aren't repeated.

This is going to be a custom facet on the user's xDB profile. You are going to want to create a custom IElementDictionary facet and for each video the user watches, put a new record in the user xDB profile. When you are showing the user a list of videos, query their tracker profile for their past videos. You can then mark them as "watched" or just hide them.

var data = Tracker.Current.Contact.GetFacet<IVideos>("Videos");
data.videoId = Id;
data.Tag = Tag;

I wrote an article of how to set up a IElementDictionary facet in this article. http://www.waitingimpatiently.com/multi-node-xdb-facet/

Jonathan Robbins has a good article here that can get you started.https://jonathanrobbins.co.uk/2015/12/08/how-to-extend-sitecore-experience-database/

1

You will require a combination of both Sitecore xDB for analytics and Database (MongoDB or SQL) to store the emotions (likes & dislikes) of the videos.

1. Create a list of the most liked videos in ranked order.

Those data will be stored in a custom database. Then you will only pull data from it to generate the list of videos which are most liked or disliked.

For point 2 to 4

You will make use of the Sitecore xDB. You will need to create a Profile and then define the different profile keys. Create Profile Cards which you will use to tag the videos. Note that you can create different ones and also tag content with more than 1.

Based on the Profile Cards that have been used to tag the videos, Sitecore will automatically start profiling the user activities. You will need to define the Pattern Cards for Sitecore to be able to see in which segment the user falls. You may make use of Goals to track if the user has viewed a video.

0

You should look into using aggregation to handle some of this. If you look in the reporting database, Sitecore actually tracks a lot of useful information for you like page views (mapped to itemid and contactid). Using this you can rank the most viewed items, and you can see if a contact has viewed this item already. You can establish your own aggregation step to establish a custom table in the reporting db with the exact information you need. E.g. Create a processor under: pipelines/interactions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.