6

I'm getting the following error while attempting to test some analytics functionality on Sitecore 9:

9528 15:23:51 ERROR Cannot create tracker.
Exception: System.InvalidOperationException
Message: session is not initialized
Source: Sitecore.Analytics
   at Sitecore.Analytics.Data.HttpSessionContextManager.GetSession()

I am simply accessing the default Sitecore Home item. Any ideas?

  • Have you resolved this issue? I am having the same problem as well. – Jovit Mayo Dec 28 '17 at 11:38
  • @JovitMayo I self-answered below, my issue was related to the server role that I was using. – techphoria414 Dec 28 '17 at 16:05
4

Ensure that you are not running in the ContentManagement role in your Web.config. For testing analytics locally you will need to use the Standalone role:

<add key="role:define" value="Standalone" />
|improve this answer|||||
  • I am getting this error on the ContentManagement server. I don't want to change it to the Standalone as this one is actually a content management system. – Arun Kumar Jun 12 '19 at 5:39
  • @ArunKumar Why do you need session/tracking on a pure CM instance? – techphoria414 Jun 13 '19 at 13:53
  • I don't need it. How do I disable it? – Arun Kumar Jun 14 '19 at 1:23
  • 1
    @ArunKumar dont enable tracking .Xdb.Tracking.Enabled to false – Avinash J Jul 4 '19 at 21:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.