Often times I hear from customers and internal teams:
- “Our Sitecore Experience Analytics is not showing any data”
- “Sitecore xDB has stopped collecting information”
- “No data in sitecore reporting server”
And so on…
Many a times the root cause is the underlying Sitecore implementation. The more scaled the implementation the more complex it is to diagnose the issue and resolve it.
This blog’s objective is to provide you with tips on what to look for when you are facing analytics issues and take you on a path helping you find the root cause of the issue and resolve it.
Let us start with the basics…
Content management (CM) server: Content management (CM) servers enable content editors to create and publish content to a website. You can configure a single content management server or multiple content management servers, depending on your content editing needs
Content management (CD) server: Content delivery servers make your web content available to your website visitors. You can configure one or more content delivery servers for improved scalability and better performance. If you expect to have high numbers of visitors or want to configure servers in different geographic locations, you can arrange content delivery servers into clusters.
Processing Server: The processing server aggregates the data in analytics database and processes it. Configure one or multiple processing servers for aggregation or other kinds of processing. You can configure a processing server in much the same way as you configure a content delivery or content management server. Multiple processing servers can provide better scalability and performance. As a general rule, the more aggregation server instances you create, the faster aggregation processing will be.
Reporting Server: The Sitecore Reporting Service fetches reporting data from various data sources, for example, the collection and reporting databases, to use in Sitecore reporting applications, such as Experience Analytics. The Reporting Service can run on the same server alongside other server features, or can run independently on a dedicated server.
Below are few important tips to help you diagnose analytics issues…
Tip 1: Architecture
Understand what your current sitecore architecture is. Build a simple server topology diagram by asking questions such as:
- Is it scaled or non-scaled?
- Do we have a separate processing server?
- Do we have a separate reporting server?
- Does my CM instance perform the roles of processing and reporting?
These questions will help you determine your next step.
Tip 2: Sitecore Configuration Files
This is a very important tip and most of the times people skip this. Sitecore follows best practices in setting up server roles. While installing sitecore, make sure you follow sitecore guidelines in
Setting up a CM server
Setting up a CD server
Setting up a Processing Server
Important Note: Enable/Disable the right configuration files based on your server roles. The enable/disable excel sheet has columns for CM+Processing or CM only. Pay close attention to those if your Sitecore is not-scaled.
Tip 3: Enable Analytics Check
Check if Sitecore Analytics is Enabled. Open the “Sitecore.Analytics.config” file in your website Website\App_Config\Include folder and verify the value of Analytics.Enabled
It should be set as follows:
<setting name=”Analytics.Enabled” value=”true” />
Tip 4: Database Configuration
Check the ConnectionString.config file to make sure the right databases are enabled on the server roles.
Below is an example of Database connection strings for configuring servers for Sitecore 8.2 version
Tip 5: Rebuild Link Databases and Indexes
Make sure you rebuild all databases and indexes as part of the process. This makes sure the underlying databases and indexes are correctly setup.
Tip 6: Session
One important thing people usually forget is, data gets pushed into the Analytics database ONLY when the session ends. The page should be closed for triggering the session end.
Behind the scenes, the default session timeout is 20 minutes. This is good for production but not ideal for troubleshooting.
One can override this default value to say “1 minute” in the “web.config” file
Default setting from web.config:
<sessionState mode=”InProc” cookieless=”false” timeout=”20″ sessionIDManagerType=”Sitecore.FXM.SessionManagement.ConditionalSessionIdManager”>
Example for 1 minute override
<sessionState mode=”InProc” cookieless=”false” timeout=”1″ sessionIDManagerType=”Sitecore.FXM.SessionManagement.ConditionalSessionIdManager”>
Once the session ends, the processing engine kicks in an data gets pushed to the analytics database. The aggregation engine kicks in after that moving the data from analytics to reporting server.
Tip 7: Brute Force Session Abandon
One option remains to force the session end and kick in the aggregation. The famous “Session.Abandon()”. Create a simple aspx page and drop it on the website root. Launch this page to forcefully end the session.
Note: Not recommended for Production
- create a test page with Session.Abandon() code
- in a new session browse the page
- in the same session access a test page to run Session.Abandon() code
- wait 2-3 minutes and check the reports.
<%@ Page language=”c#” %>
<% Session.Abandon(); %>
Hope these tips help you diagnose your analytics issues.