xc banner image

Activate Reporting Service on Content Delivery Environments

  • Twitter
  • LinkedIn

Resolving Sitecore 9.3 Reporting Service Access Issue for WeBlog's "Interesting Entries" Component

When upgrading Sitecore from version 8.2.7 to 9.3, a common challenge that developers face is ensuring that custom modules and components work as expected after the upgrade. A specific issue encountered during our upgrade was with the WeBlog module and its Interesting Entries component. After completing the upgrade, the component failed to render any data and logged errors. This article outlines the problem, its root cause, and the steps taken to resolve it.

The Issue: "Interesting Entries" Not Rendering Data

After upgrading Sitecore to version 9.3, we noticed that the Interesting Entries component within the WeBlog module was not displaying data as expected. The component, which relies on the Reporting Database to pull page view counts for each article, was failing to connect to the required analytics data.

The error logs indicated an issue with the configuration, specifically the message:

"Could not find configuration node: reporting/dataProvider."

Upon further investigation, we realized that this issue stemmed from the Content Delivery (CD) server not having access to the Remote Reporting Service by default in a scaled Sitecore topology.

Root Cause: Lack of Remote Reporting Service Access

In Sitecore 9.3, when using a scaled deployment, the CD server does not have access to the Remote Reporting Database unless explicitly configured. This is especially common in configurations where the Content Management (CM) server has access to the Reporting Database, but the CD server does not. The Interesting Entries component pulls page view data from the Reporting Database, but without the proper access on the CD server, the component cannot render the data.

The default Sitecore setup in a scaled environment does not allow the CD server to communicate with the Reporting Service, which is why the component failed to function correctly.

Solution: Configuring the CD Server to Connect to the Reporting Service

After researching the issue and consulting with the Sitecore community, we found two possible solutions:

  1. Remove the "Interesting Entries" Component from the page.
  2. Configure the CD Server to Access the Reporting Service.

While many chose to remove the component, we decided to go with the second option as it would allow us to maintain the functionality of the Interesting Entries component.

Steps to Resolve the Issue:

The solution involved configuring the CD server to connect to the Remote Reporting Service. Here are the detailed steps we followed:

1. Create/Modify the Configuration File for the Reporting Service on the CD Server

The first step was to ensure that the CD server could connect to the Remote Reporting Service. To do this, we needed to modify or create a configuration file on the CD server. The configuration file had to include the URL of the reporting service and the necessary authentication key (API key) to enable the connection.

Here’s an example of the required configuration:{{Reporting Service URL Goes Here}}
          reporting.apikey
          X-Reporting-Api-Key
          32
          100000
        /~/v75/reporting/remotedatasourceproxy/


Explanation:

  • Replace
  • {Reporting Service URL}
  • with the actual URL of your Reporting Service. You can typically find this in the CM server’s configuration.
  • X-Reporting-Api-Key
  • : This is the API key required to authenticate the connection to the Reporting Service. The key can be found in the CM server’s configuration as well.
  • timeout
  • and
  • maxRows
  • : These parameters define the timeout and the maximum number of records that can be pulled at once, which can be adjusted according to the scale of your deployment.

2. Add the Reporting API Key to the Connection Strings File for the CD Server

In addition to the configuration file, we had to ensure that the Reporting API key was added to the connection strings for the CD server. This key allows the CD server to authenticate when pulling analytics data from the Reporting Service.

This can be done by referencing the API key from the CM server configuration or by directly adding it to the CD server's connection string files.

3. Restart the CD Server and Clear Cache

Once the changes were made to the configuration files, we restarted the CD server and cleared its cache to apply the new settings. This step is crucial for the configuration changes to take effect.

4. Test the Solution

After the server restart, we tested the Interesting Entries component. The data began to render correctly, and the errors in the logs stopped, confirming that the CD server was now successfully connecting to the Reporting Service and pulling the necessary data.

Conclusion: A Successful Resolution

By configuring the Content Delivery server to connect to the Remote Reporting Service, we were able to resolve the issue with the Interesting Entries component in the WeBlog module. This allowed the component to render page view data as expected, and we did not need to remove the component from the page.

If you're encountering a similar issue with your Sitecore 9.3 upgrade or in a scaled Sitecore environment, configuring your CD server to connect to the Remote Reporting Service can be a simple yet effective solution. It ensures that all components relying on analytics data, such as WeBlog’s Interesting Entries, function as expected.