Sitecore Analytics Troubleshooting: Important Tips

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

https://doc.sitecore.net/sitecore_experience_platform/82/setting_up_and_maintaining/xdb/configuring_servers/configure_a_content_management_server

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.

https://doc.sitecore.net/sitecore_experience_platform/82/setting_up_and_maintaining/xdb/configuring_servers/configure_a_content_delivery_server

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.

https://doc.sitecore.net/sitecore_experience_platform/82/setting_up_and_maintaining/xdb/configuring_servers/configure_a_processing_server

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.

https://doc.sitecore.net/sitecore_experience_platform/82/setting_up_and_maintaining/xdb/configuring_servers/configure_a_reporting_service_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

Etc…

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

https://doc.sitecore.net/sitecore_experience_platform/82/setting_up_and_maintaining/xdb/configuring_servers/database_connection_strings_for_configuring_servers

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

  1. create a test page with Session.Abandon() code
  2. in a new session browse the page
  3. in the same session access a test page to run Session.Abandon() code
  4. wait 2-3 minutes and check the reports.

 

Sample SessionAbandon.aspx

<%@ Page language=”c#” %>

<!DOCTYPE html>

<html>

<head>

</head>

<body>

<div>Abandon Session</div>

<% Session.Abandon(); %>

</body>

</html>

 

Hope these tips help you diagnose your analytics issues.

 

Leave a Reply