• Not Answered

Proper way to programmatically add profile/pattern data to the tracker.

I am able to come up with two approaches to adding profile data to the tracker and maybe someone can give me some details on the different.

I can add the scoring via the behavioral profiles (Tracker.Contact.BehaviorProfile.Profiles)

var profile = Tracker.Current.Contact.BehaviorProfiles[new ID("Constants.Items.Profiles.Industry")];
profile.SetScore(new ID("{9B414501-1EDE-493D-A110-6271CF3D186A}"), 10);

Or I can use the profiles in the interactions object (Tracker.Current.Interaction.Profiles)

var profile = Tracker.Current.Interaction.Profiles[Constants.Items.Profiles.Industry.Name];
var scores = new Dictionary<string, float> { { "Agriculture", 10 } };


Does anyone know the difference between Tracker.Current.Interaction.Profiles and Tracker.Contact.BehaviorProfile.Profiles. The Tracker.Current.Interaction.Profiles is more up to date with the totaling and pattern matching, but the object that makes it (Sitecore.Analytics.Tracking.VisitProfiles) is deprecated in 8.1. So it seems like it going away.

Any guidance would be great.

Thanks all.