0

我在我的 Sitecore 网站中添加了个性化规则 - “当前联系人的性别是男性”,但我不知道如何设置“访问者设置”来测试它。

如果有人可以帮助我,我将不胜感激。

提前致谢!

4

1 回答 1

0

/sitecore/system/Settings/Rules/Definitions/Macros/Social/Gender我在默认 Sitecore 8 安装中发现的唯一性别条件是来自位于Sitecore 树中的社交模块(现在是内置的)的条件。查找它的代码,我看到以下代码:

protected override bool Execute(T ruleContext)
{
  if (!AnalyticsSettings.Enabled || Tracker.Current == null || Tracker.Current.Contact == null)
    return false;
  return string.Equals(this.GenderValue, ((IGenderConditionManager) ResolutionExtensions.Get<IGenderConditionManager>((IResolutionRoot) ExecutingContext.Current.IoC, new IParameter[0])).GetGender(GuidExtensions.GetIdentifier(Tracker.Current.Contact.ContactId)).ToString(), StringComparison.OrdinalIgnoreCase);
}

从上面的代码中我们可以看到,要使性别条件起作用,您应该启动并运行分析和跟踪。因此,如果您启用了该功能 - 确保所有设置均正确且确实有效。

用户会员提供者本身没有性别设置;所以上面的规则条件只能从跟踪中获取。

于 2015-10-05T10:16:56.670 回答