TL;DR

You can assign profile cards to Sitecore items on the fly in the ProcessItem pipeline, using my custom RunRules processor.

Source: https://github.com/buildabonfire/rule-based-profile-cards
Video: https://www.youtube.com/watch?v=4byV9HoroDE
Next Steps: Use Machine Learning to determine right profile card.

Full Read

We here at Bonfire just finished a large marketing engagement with an awesome client. This client is probably like most of your clients. They have a LOT of data, editors who are good at their jobs, and don't really have time to assign and maintain profile cards to each piece of content in the system. It's a huge issue with personalization with Sitecore. Getting enough profile data to make it useful, and being able to change the the keys easily when you analyze your results to find trends.

I thought, "if I could just centralize the profile keys and remove the requirement of assigning profile keys, I could take the work load of the editors and put it on logic using data we already have." Since this needed to be on the item level, let's use rules!

When I first looked ProcessItem pipeline, I found that there was plenty of code that was calculating profiles, determining patterns, and working with items. But there was nothing to run a list of rules. That was weird and unexpected to me. You can put rules on templates and pages, but not run rules like you can on triggerCampaign, visitEnd, initializeTracker, uiGetMasters, and getContentEditorWarnings.

So step one was to create a new RunRules processor for the ProcessItem pipeline. This is what I can use to give me the control I need. I put the new Process Item rules container under /sitecore/system/Settings/Analytics/Rules.

Now that I can run rules, let's let them assign a profile key. To do that, I needed a rules macro to let the user pick a profile key to assign to the item in the processor.

Finally, we need to assign the profile card to the item when all the rules are passed. The key here is to assign the profile key and then run the calculations.

Now that this is all complete, we can create a rule to specify our parameters like:

  • Item hierarchy
  • Url
  • Item data like category, taxonomy, etc...
  • Using the user's facet data to fine-tune the profile keys further.
  • And more

Profile-Rule

When the rule runs, and we have enough pages to allow for scoring, we get the profile key(s) assigned and the pattern cards calculated.
Profile-DTO

So there you have it. Score thousands...tens of thousands of items with a few well targeted rules. Get profiling and start analyzing your user's data.

Next Steps

I am going to take this a step futher and use Mark Stiles Machine Learning repo and let ML figure out what profile card to use.