This blog post quickly talks about a issue and resolution which I faced in populating the data in commerce related reports in experience analytics and experience profile.
My System Setup
The solution I was running was on Sitecore Commerce 8.2.1 and it was running the Habitat Retail Demo Site Link to the GitHub Repo .
The symptoms of this issue are related to analytics data not being recorded and displayed in the Experience Analytics Dashboard. The following reports were showing no data
- Commerce- -> Orders report
- Commerce–> Products report
Order Report in Experience Analytics Dashboard
Experience Profile reports : An Error Occurred
Errors in Log Files
In order to reproduce the issues, I placed an order on the website and quickly looked at the logs, the order it self processed successfully but the analytics events were not being processed.
Issue Description
The resolution to this issue was cumbersome because nothing really stood out to me , I have listed my troubleshooting path below
- Ensured that the commerce related page events are deployed correctly
- Mongo DB was collecting the interactions correctly
- SQL Server reporting databases has the page definitions
Upon further analysis , I have found out that throughout the code, sitecore commerce triggers a lot of events programatically, some of them have been listed below
Upon decompiling the DLL, I had discovered that when the order is created , The following event(s) are triggered programatically
Method Name : Sitecore.Commerce.AnalyticsData.OrderGoalAnalyticsData
Resolution
The real cause of the issue was that the goals were being triggered twice. The goal “Visitor Order Created” was checked on the “Order Confirmation Page” and this was causing the goal to be triggered twice (Once programatically and other through the UI). I had to un-check the goal as shown below and rebuild my reporting DB to get it all up and running again
After un-checking the goal as shown above, Here are the reports.
Experience Analytics Order Report
Experience Profile : Commerce Tab Order Reports
Please feel free to comment / reach me out at twitter @sjain_hi