2

Basically, I disabled xDB fully on web site, but I still see errors from Analytics

ERROR Media request analytics failed

Exception:
  System.InvalidOperationException Message: Tracker.Current is not initialized 

Source: Sitecore.Analytics
  at Sitecore.Analytics.Pipelines.StartAnalytics.StartTracking.Process(PipelineArgs args) at (Object , Object[] )
  at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
  at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, Boolean failIfNotExists)
  at Sitecore.Analytics.Pipelines.StartAnalytics.StartAnalyticsPipeline.Run()
  at Sitecore.Analytics.Media.MediaRequestEventHandler.StartTracking()
  at Sitecore.Analytics.Media.MediaRequestEventHandler.OnMediaRequest(Objec sender, EventArgs args)

How to disable analytics for media requests?

5
  • 1
    This might help: sitecore.stackexchange.com/questions/3254/… Feb 20, 2018 at 13:09
  • 1
    1) Which version of Sitecore? 2) How exactly did you disable xDB? 3) In your ShowConfig.aspx, check the value of Xdb.Tracking.Enabled. It needs to be set to false. Feb 20, 2018 at 14:10
  • @DmytroShevchenko it was done 100% it is only one issue with images Feb 21, 2018 at 11:51
  • Which version of Sitecore are you using?
    – Ben Golden
    Feb 22, 2018 at 6:31
  • @BenGolden sitecore 8.2 with latest SP Feb 22, 2018 at 8:44

2 Answers 2

2

I went throw a code that is inside of MediaRequestSessionModule, it is inherited from Sitecore.Analytics.Media.MediaRequestSessionModule

, the problem is I need to keep Xdb.Tracking.Enabled on, but Xdb off. and regarding code inside of MediaRequestSessionModule the best way is just to disable OnMediaRequest

 <sitecore>
    <events>
      <event name="media:request">
        <handler method="OnMediaRequest">
          <patch:delete />
        </handler>
      </event>
    </events>
</sitecore>
1
  • Thanks. We needed Xdb.Tracking.Enabled turned on as well to be able to use/track some personalization stuff but we don't need all of xDB for that. Jun 25, 2018 at 8:51
0

You need to set the Xdb.Tracking.Enabled setting to false. The first thing the OnMediaRequest method does is check that setting and exit if it is false. You could not get the stack trace shown if that setting were false. Check the /sitecore/admin/showconfig.aspx page to confirm the setting after all config patches have been merged in.

Your Answer

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

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