Recently, I was diagnosing an issue as to why Sitecore Analytics was not working for one of our 8.1 recent installations. I started with this helpful blog post by one of the guys at nonlinear digital:
Well, after thoroughly going through all the steps my analytics were still not working and no data was being received by MongoDB in my Interactions collection and my Reporting database (analytics) was not receiving any data. After speaking with Sitecore Support, they mentioned that in the Global.asax file you must derive from the Sitecore.Web.Application to support the session end handler. When I checked my Global.asax it was set to derive from System.Web.HttpApplication. Once I set to derive from Sitecore.Web.Application this cleared up a couple of errors within the solution relating to the VisitorIdentification SitecoreHelper for MVC (@Html.Sitecore().VisitorIdentification()) and using statement (@using SItecore.Mvc.Analytics.Extensions). But most important, tracking started working as my collections in MongoDB and Reporting DB started receiving data.
Moral of the story, don’t miss this step upon setup of your solution in the beginning of your setup to work with Sitecore 8 as it will prove hard to diagnose. Hopefully, this helps out others who run across this situation. Happy coding!
I seem to recall having that same problem before. 🙂
Another option is to simply remove Global.asax from your VS solution when you’re initially creating it. It’ll also keep you from being tempted to through additional code into the Global.asax.cs, encouraging you to tap into the pipeline instead.
Thanks for the post, i was having the same issue. When i read this, i thought ‘ofcourse i have it set to derive from Sitecore.web.Application’, but i didnt 🙂 Works now!
Awesome! Yes, it’s the small things we overlook sometimes. Happy coding!