Sitecore Tracker.Current is not initialized

Ricardo Azeitona picture Ricardo Azeitona · Oct 21, 2016 · Viewed 10.1k times · Source

I'm having this issue related with Tracker.

[InvalidOperationException: Tracker.Current is not initialized]
   Sitecore.Analytics.Pipelines.StartAnalytics.StartTracking.Process(PipelineArgs args) +304
   (Object , Object[] ) +74
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +484
   Sitecore.Analytics.Pipelines.StartAnalytics.StartAnalyticsPipeline.Run() +293
   Sitecore.Mvc.Analytics.Pipelines.MvcEvents.RequestBegin.StartTracking.Process(RequestBeginArgs args) +139
   (Object , Object[] ) +74
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +484
   Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args) +184
   Sitecore.Mvc.Routing.RouteHttpHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +74
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +923
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +157

In the web.config I've the

enableTracking="true"

If I set to false it works but there's no Tracking

Answer

Sasha picture Sasha · Oct 3, 2017

There are multiple factors that can contribute to the issue you are experiencing. To simplify and summarize comments given previously, you need to be sure that:

  1. MongoDB is running
  2. Your Connection Strings properly set
  3. Sitecore License has xDB added
  4. Xdb.Enabled and Xdb.Tracking.Enabled are both set to "true"
  5. Analytics.ClusterName in Sitecore.Analytics.Tracking.config is a proper hostname
  6. Verify you have VisitorIdentification tag added (to weed out robots)