1

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?

  • 1
    This might help: sitecore.stackexchange.com/questions/3254/… – Mark Cassidy Feb 20 '18 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. – Dmytro Shevchenko Feb 20 '18 at 14:10
  • @DmytroShevchenko it was done 100% it is only one issue with images – Arbejdsglæde Feb 21 '18 at 11:51
  • Which version of Sitecore are you using? – Ben Golden Feb 22 '18 at 6:31
  • @BenGolden sitecore 8.2 with latest SP – Arbejdsglæde Feb 22 '18 at 8:44
1

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>
| improve this answer | |
  • 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. – Søren Kruse Jun 25 '18 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.

| improve this answer | |

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.