Sitecore Analytics Robots SessionTimeout导致会话超时过早

时间:2012-06-19 21:44:28

标签: .net sitecore

在我们的一个项目中,我们遇到了随机会话超时问题。根据最近的发现,我注意到Sitecore Analytics.Robots.SessionTimeout可能是造成它的原因。

我们注意到在随机会话超时时,超时值设置为1分钟而不是120分钟。

在搜索完所有配置文件后,我们注意到只有一个配置的超时设置为1分钟。

我们认为通过将分析机器人会话超时增加到120分钟将解决我们的随机超时问题,但我的问题是,通过允许机器人会话生存120分钟而不是1分钟,这会产生任何负面的性能影响或安全问题吗?

感谢您的建议。

3 个答案:

答案 0 :(得分:2)

这对我来说似乎是一个不同的问题......我认为这不是机器人设置为1分钟会话的问题。你说这个问题是“随机的”,但真正发生的是一些网站访问者被错误识别为机器人吗?

我认为你不会通过改变机器人超时来看到任何性能影响,但这将是治疗症状而不是找到真正的原因。

答案 1 :(得分:2)

我已经使用Sitecore记录了这个问题,这是他们对这个问题的回应。

  

我不认为该行为应该被视为一个bug,因为   Sitecore CMS旨在与ASP.NET WebForms技术一起使用。   使用Web表单时,bot检测依赖于    控制在   这页纸。很自然,你不能在ASP.NET MVC中使用它   应用程序,但有一个简单的解决方案 - 把以下代码   在元素内:

<%
if (Context.Diagnostics.Tracing || Context.Diagnostics.Profiling)
{
  Response.Write("<!-- Visitor identification is disabled because debugging is active. -->");
}
else if (Tracker.IsActive && (Tracker.Visitor.VisitorClassification == 925))
{
  Response.Write("<link href=\"/layouts/System/VisitorIdentification.aspx\" rel=\"stylesheet\" type=\"text/css\" />");
}
%>

答案 2 :(得分:0)

发生这种情况是因为跟踪预防和广告拦截器阻止了 Sitecore's robot detection component (VisitorIdentification.js) 检测人类行为。

为了防止登录用户被错误归类为机器人,我们添加了以下登录后代码以将任何错误归类的访问者标记为人类:

using Sitecore.Analytics;
using Sitecore.Analytics.Core;

// ...

private static void IdentifyUserAsHuman()
{
    const int HumanVisitorClassification = 0;

    var currentSession = Tracker.Current.Session;
    var isClassifiedAsHuman = ContactClassification.IsHuman(currentSession.Contact.System.Classification);
    if (!isClassifiedAsHuman)
    {
        currentSession.SetClassification(HumanVisitorClassification, HumanVisitorClassification, true);
    }
}
相关问题