如何完全禁用Sitecore Analytics

Ide*_*ity 6 sitecore sitecore6 sitecore-dms

我们的生产服务器遇到了cpu问题.在使用jetbrains cpu profiler进行分析后,我们注意到程序集中的某些函数Sitecore.Analytics已被执行.

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

在查看之后/sitecore/admin/showconfig.aspx我们注意到Sitecore.Analytics在这个配置中仍然有很多相关的配置,而这些配置在我们的配置文件中被停用.

例如

在文件中/App_Config/Include/EventHandlers.config,配置如下所示:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
 <sitecore>
   <events timingLevel="custom">
   </events>
 </sitecore>
</configuration>
Run Code Online (Sandbox Code Playgroud)

在查看showconfig.aspx它时看起来像这样:

<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>
Run Code Online (Sandbox Code Playgroud)

有谁知道为什么这些仍在返回showconfig.aspx?有没有办法完全删除/禁用sitecore分析模块?

Mar*_*idy 6

是.将/ 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