目标表达式未应用于广告 [英] Target Expression not getting applied for advertisements
问题描述
我需要根据目标表达式显示广告。为此,我将关键字属性添加到商业服务器管理器中的定位上下文配置文件。
我正在为TargetingContextProfile设置关键字属性。但即使我的表达式评估为假,我的广告也会显示出来。
以下是我正在使用的代码。
CommerceContext csContext = CommerceContext.Current;
csContext.TargetingSystem.TargetingContextProfile ["关键词"]值= QUOT。LSL111英寸;
         &NBSP ;  Microsoft.CommerceServer.Runtime.Targeting.ContentSelector contentSelector = csContext.TargetingSystem.SelectionContexts ["广告"]。GetSelector();
             contentSelector.ItemsRequested = 3;
contentSelector.Profiles.Add(QUOT; targetingContext" ;, csContext.TargetingSystem.TargetingContextProfile);
            System.Collections.Specialized.StringCollection含量= contentSelector.GetContent();
 
代码似乎是正确的,我建议启用登录广告管道以找出问题所在......我的第一个想法是表达式不正确....
斯泰利奥
Hi,
I need to display advertisements based on Target expressions. For that i added a Keywords property to the Targeting context profile in commerce server manager.
I am setting the Keywords property for the TargetingContextProfile. But my advertisements are getting displayed even if my expression is evaluating to false.
Below is the code i am using.
CommerceContext csContext = CommerceContext.Current;
csContext.TargetingSystem.TargetingContextProfile["Keywords"].Value = "LSL111";
Microsoft.CommerceServer.Runtime.Targeting.ContentSelector contentSelector = csContext.TargetingSystem.SelectionContexts["advertising"].GetSelector();
contentSelector.ItemsRequested = 3;
contentSelector.Profiles.Add("targetingContext", csContext.TargetingSystem.TargetingContextProfile);
System.Collections.Specialized.StringCollection content = contentSelector.GetContent();
the code seems correct, I would suggest to enable the Log on the Advertising pipelines to figure out what's the problem.... my first thought was that the Expression is not correct....
Stelio
这篇关于目标表达式未应用于广告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!