如何完全禁用Sitecore分析

如何完全禁用Sitecore分析,sitecore,sitecore6,sitecore-dms,Sitecore,Sitecore6,Sitecore Dms,我们的生产服务器出现cpu问题。在使用jetbrains cpu profiler进行评测之后,我们注意到assemblySitecore.Analytics中的一些函数已经执行 这有点奇怪,因为我们已经在de-config文件中禁用了所有与分析相关的配置 在查看了/sitecore/admin/showconfig.aspx之后,我们注意到此配置中仍然存在大量与sitecore.Analytics相关的配置,而这些配置在我们的配置文件中被停用 比如说 在文件/App\u Config/Incl

我们的生产服务器出现cpu问题。在使用jetbrains cpu profiler进行评测之后,我们注意到assembly
Sitecore.Analytics
中的一些函数已经执行

这有点奇怪,因为我们已经在de-config文件中禁用了所有与分析相关的配置

在查看了
/sitecore/admin/showconfig.aspx
之后,我们注意到此配置中仍然存在大量与
sitecore.Analytics
相关的配置,而这些配置在我们的配置文件中被停用

比如说

在文件
/App\u Config/Include/EventHandlers.Config
中,配置如下所示:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
 <sitecore>
   <events timingLevel="custom">
   </events>
 </sitecore>
</configuration>
<events timingLevel="custom">
<event name="forms:save"/>
<event name="item:saved">
            <handler type="Sitecore.Analytics.Data.Items.ItemEventHandler, Sitecore.Analytics" method="OnItemSaved"/>
            <handler type="Sitecore.Analytics.Automation.Data.Items.ItemEventHandler, Sitecore.Automation.MarketingAutomation" method="OnAutomationStateChanged"/>
        </event>
        <event name="item:deleted">
            <handler type="Sitecore.Analytics.Automation.Data.Items.ItemEventHandler, Sitecore.Automation.MarketingAutomation" method="OnAutomationStateChanged"/>
        </event>
        <event name="media:request">
            <handler type="Sitecore.Analytics.Media.MediaRequestEventHandler, Sitecore.Analytics" method="OnMediaRequest"/>
        </event>
</events>
有人知道为什么它们仍然在
showconfig.aspx
中返回吗?
是否有办法完全删除/禁用sitecore分析模块?

是。将/App_Config/Include目录中Sitecore.Analytics的3个配置文件重命名为*.Config以外的其他文件

这3个文件是:

  • Sitecore.Analytics.config
  • Sitecore.Analytics.ExcludeRobots.config
  • Sitecore.Analytics.RobotDetection.config
(可能因版本而异,但都是从Sitecore.Analytics开始的)

将它们重命名为如下内容:

  • Sitecore.Analytics.config.disabled
  • Sitecore.Analytics.ExcludeRobots.config.disabled
  • Sitecore.Analytics.RobotDetection.config.disabled
(可能因版本而异,但都是从Sitecore.Analytics开始的)

在sitecore版本72之前,只有3个文件具有sitecore.Analytics前缀。在版本75中,有17个配置文件,而在版本8中,有20个配置文件的前缀为Sitecore.Analytics

我曾经向sitecore支持部门确认,您可以更改分析设置。在sitecore.Analytics.config中启用将禁用分析

<setting name="Analytics.Enabled" value="false" />

或者只重命名一个包含此设置的文件Sitecore.Analytics.config。

是否尝试使用WFFM? 还有一部分: Sitecore.WFFM.Analytics.config

禁用它会导致此故障:

22992 14:49:10警告值不能为空。参数名称:所有者 异常:System.ArgumentNullException消息:值不能为null。 参数名称:所有者来源:Sitecore.Kernel位于 Sitecore.Diagnostics.Assert.ArgumentNotNull(对象参数,字符串 在Sitecore.Diagnostics.Log.Warn(字符串消息, 对象所有者),位于Sitecore.WFFM.Core.Extensions.Warn.IsNull(对象 obj,字符串名称)位于 Sitecore.WFFM.Analytics.AnalyticsTracker.get_SessionId()位于 Sitecore.Form.Core.FormDataHandler.ExecuteSavActions(ID formId, 控制结果[]字段,操作定义[]操作)位于 Sitecore.Form.Core.FormDataHandler.ProcessData(SimpleForm表单, ControlResult[]字段,ActionDefinition[]操作)


因此它不能被禁用。

请注意(对于Sitecore 8.0 rev.150121),体验分析模块没有考虑此设置:ExperienceAnalytics Reduce子系统未初始化,因为日志文件中显示了禁用的分析,但其分段初始值设定项在几行之后抛出异常。同时,访问Sitecore启动板会尝试通过远程调用获取聚合统计数据,这会导致另一个异常。仅供参考,有些Sitecore功能依赖于活动的分析。一个立即浮现在脑海中的是IP地理编码。因此,如果您使用该功能来驱动基于地理位置的内容,当分析被禁用时,它将失败。