Search code examples
sitecoresitecore6sitecore-dms

How to disable Sitecore Analytics entirely


We are experiencing cpu problems on our production servers. After profiling with the jetbrains cpu profiler, we have noticed that some functions in the assembly Sitecore.Analytics were executed.

This is somewhat strange because we have disabled all analytics related configuration in de config files.

After looking into the /sitecore/admin/showconfig.aspx we noticed that there are still a lot of Sitecore.Analytics related configurations in this config while these are deactivated in our config files.

For example

In the file /App_Config/Include/EventHandlers.config the configuration looks like this:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
 <sitecore>
   <events timingLevel="custom">
   </events>
 </sitecore>
</configuration>

When looking into the showconfig.aspx it looks something like this:

<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>

Does anyone has an idea why these are still returning in the showconfig.aspx? Is there a way to fully delete/disable the sitecore analytics module?


Solution

  • Yes. Rename the 3 configuration files for Sitecore.Analytics in your /App_Config/Include directory to something other than *.config

    The 3 files are:

    • Sitecore.Analytics.config
    • Sitecore.Analytics.ExcludeRobots.config
    • Sitecore.Analytics.RobotDetection.config

    (could vary a little bit by version, but they all start with Sitecore.Analytics).

    Rename them to something like:

    • Sitecore.Analytics.config.disabled
    • Sitecore.Analytics.ExcludeRobots.config.disabled
    • Sitecore.Analytics.RobotDetection.config.disabled