What is the best way to disable Analytics on Sitecore 7.2?

In Sitecore 8 you can disable Analytics (MongoBD) by placing a config file under Website\App_Config\Include this file would include the following configurations:

<configuration xmlns:patch="www.sitecore.net/xmlconfig">
  <sitecore>
   <pipelines>
     <initialize>
	    <processor type="Sitecore.Pipelines.Initialize.PrecompileSpeakViews, Sitecore.Speak.Clientpro" >
		  <patch:delete />
		</processor>
	    <processor type="Sitecore.ContentTesting.Pipelines.Initialize.RegisterContentTestingCommandRoute, Sitecore.ContentTesting" >
		  <patch:delete />
		</processor>
        <processor type="Sitecore.Pipelines.Initialize.PrecompileSpeakViews, Sitecore.Speak.Client" use="ContentTesting" >
		  <patch:delete />
		</processor>
	 </initialize>
	 <mvc.renderPageExtenders>
        <processor patch:after="processor[@type='Sitecore.Mvc.ExperienceEditor.Pipelines.RenderPageExtenders.RenderExtendersContainer, Sitecore.Mvc.ExperienceEditor']"  type="Sitecore.Mvc.ExperienceEditor.Pipelines.RenderPageExtenders.RenderPageEditorExtender, Sitecore.Mvc.ExperienceEditor"></processor>
        <processor patch:after="processor[@type='Sitecore.Mvc.ExperienceEditor.Pipelines.RenderPageExtenders.RenderExtendersContainer, Sitecore.Mvc.ExperienceEditor']"  type="Sitecore.Mvc.ExperienceEditor.Pipelines.RenderPageExtenders.RenderPreviewExtender, Sitecore.Mvc.ExperienceEditor"></processor>
        <processor patch:after="processor[@type='Sitecore.Mvc.ExperienceEditor.Pipelines.RenderPageExtenders.RenderExtendersContainer, Sitecore.Mvc.ExperienceEditor']"  type="Sitecore.Mvc.ExperienceEditor.Pipelines.RenderPageExtenders.RenderDebugExtender, Sitecore.Mvc.ExperienceEditor"></processor>
        <processor type=""Sitecore.Mvc.ExperienceEditor.Pipelines.RenderPageExtenders.SpeakRibbon.RenderPageEditorSpeakExtender, Sitecore.Mvc.ExperienceEditor" >
		  <patch:delete />
		</processor>
      </mvc.renderPageExtenders>
   </pipelines>
   <settings>
		<setting name="Analytics.Enabled" > <patch:attribute name="value" value="false" />
		</setting>
   </settings>
  </sitecore>
</configuration>

I'm wondering how to do the same thig on Sitecore 7.2?

  • Sitecore 7.2 also have the same setting
    i.e.
    <configuration><sitecore><settings>
    <setting name="Analytics.Enabled">
    <patch:attribute name="value" value="false" />
    </setting>
    </settings></sitecore></configuration>
  • Its simpler - you can just set the Analytics.Enabled property to false and also disable the database writes using Analytics.DisableDatabase.

    <sitecore>
       <settings>
            <setting name="Analytics.Enabled" > <patch:attribute name="value" value="false" />
            </setting>
            <setting name="Analytics.DisableDatabase"> <patch:attribute name="value" value="true" />
            </setting>
        </settings>
    </sitecore>
  • In reply to Richard Seal:

    As in Sitecore.Analytics.Config:

    <!-- ANALYTICS DISABLE DATABASE Disables the database so that no reading or writing to the database occurs. Default: false --> <setting name="Analytics.DisableDatabase" value="false" />

    therefore the value should be "true" to disable the reading and writing.

    I would suggest to disable the config by simply rename it to "Sitecore.Analytics.Config.disabled". This will removed all the extra steps performed by analytics related pipelines used by Marketing Analytics
  • In reply to Brian Lee:

    Good catch - I mean't to change that and forgot! I shall update my answer :)

    The advantage to disabling the database, means that you can set Analytics.Enabled = true and still use the personalization rules engine for your presentation components.  If you don't want/need to use those, then yes, disabling the config might be best.