[英]Trigger a profile in Sitecore DMS 7.5
我在sitecore 6.5中使用以下代碼觸發配置文件:
var profile = Sitecore.Analytics.Tracker.CurrentVisit.GetOrCreateProfile("<Profile Name>");
profile.BeginEdit();
profile.Score("<profile key>",<profile key value you want to set>);
profile.Score("<profile key>",<profile key value you want to set>);
profile.UpdatePattern(); //sets the appropriate pattern based on the current profile keys values you have just set.
profile.EndEdit();
現在它不適用於新的dms API,您知道我應該使用什么嗎?
采用
Sitecore.Analytics.Tracker.Current.Interaction.Profiles
以此目的
觸發Sitecore 7.5+中的配置文件的完整代碼如下:
var profile = Tracker.Current.Interaction.Profiles["yourProfile"];
var scores = new Dictionary<string, float>();
scores.Add("key1", 5);
scores.Add("key2", 10);
profile.Score(scores);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.