7

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?

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

1 Answer 1

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" />
4
  • 1
    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, 2019 at 5:39
  • @ArunKumar Why do you need session/tracking on a pure CM instance? Jun 13, 2019 at 13:53
  • I don't need it. How do I disable it?
    – Arun Kumar
    Jun 14, 2019 at 1:23
  • 1
    @ArunKumar dont enable tracking .Xdb.Tracking.Enabled to false
    – Avinash J
    Jul 4, 2019 at 21:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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