SITECORE Reports: Creating a custom Experience Analytics report



You can create an experience analytics report from scratch using Microsoft Visual Studio and Sitecore Rocks.

If you want to change or customize a standard report that comes with Experience Analytics, it is best practice to copy an existing report, customize it, and then rename it.

Create a new Report page item:

Add a new report page to the content tree. A report page contains other subitems that you need when you configure your report.

To create a report page:

  1. Open Sitecore Rocks and create a connection to your website.

  2. In the website content tree, navigate to the Dashboard node using the following path:

    core/sitecore/client/Applications/ExperienceAnalytics/Dashboard

  3. To add a new report page under this item, select a report category, for example, Acquisition. Right-click the category, click Add and then click New Item.

  4. In the New Item dialog box, click All to see all available SPEAK report templates.

    To find all available report templates, enter a search term beginning with experience analytics.

    4EA09EB05FA04838B3DFBEEAD1B41F4F.png
  5. Select the ExperienceAnalyticsReportPage. You can accept the default name or provide a name for the item, for example, TestReportPage.

  6. Click OK to save your changes.

    Your new report page appears in the content tree below the category, for example, Acquisition, and it also contains a PageSettings subitem.

    6FB0BD8904F64016B5EBD86B1CA7ACC8.png

Add a Chart component to a Report:

Before you can add a chart component to a report, you first need a report page.

To add a chart component to a report page:

  1. In Sitecore Rocks, right-click a report page, click Tasks, and then click Design Layout.

  2. In the Design Layout window, click AddRendering.

  3. In the Select Rendering dialog box, select a chart control to use on your report page.

    To find all available chart controls, enter a search term beginning with experience analytics. You can choose from an area chart, bar chart, list, or line chart. For example, to display a bar chart, select the ExperienceAnalyticsBarChart rendering.

    D6BBE7DC63B64DA39FF6C848937B0C01.png
  4. Choose a chart type and click OK to save your changes.


Add a parameters item to the Report:

You need a parameters item to configure report metrics and other settings in your chart. A parameters item is a subitem of the PageSettings item.

To add a parameters item:

  1. On the report page, right-click the PageSettings item and click Add - New Item.

    To find all available chart parameter controls, enter a search term beginning with experience analytics. You can see parameters items for each type of chart control. For example, if you are using the bar chart control, select the ExperienceAnalyticsBarChartParameters item.

    81B18227941D43CA813F4573D90A4B7C.png
  2. You can enter a name for your parameters item or accept the default name, then click OK.

  3. To configure the parameters item, double click the item to open it.

  4. In the parameters item, select a metric and add a segment to your chart.

    E7508BF4C913410CA14831DFE21960BB.png

    For example, to show conversions from all visits by country, select the following:

    • Metric = Conversions

    • Segment = All visits by Country

  5. Save your changes.


Bind the Bar Chart control to the parameter items:


If you do not bind the bar chart control to the parameters item, your report will not display any data.

To bind the ExperienceAnalyticsBarChart control to the parameters item:

  1. Right-click the report, click TaskDesign Layout, and then double-click the chart item that you have created. For example, double click the ExperienceAnalyticsBarChart control.

  2. In the Edit Rendering Properties dialog box, in the Behavior section, in Data Source, browse to the location of the ExperienceAnalyticsBarChartParameters item in the content tree.

    F98DAF9021B947E3BB31CE5D67DBE51B.png
  3. Select the parameters item and click OK.

  4. Save your changes.


Change the Chart Title:

Your new chart needs a heading to describe the content that it displays.

To change a title label on a chart:

  1. Double-click the parameters item for your chart.

  2. In the parameters item, expand the Appearance section.

  3. In the Title field, enter the relevant title, for example, Conversions by country.

    B6E10B804206444D9F00BF0D2BAA3508.png
  4. Save your changes and view the chart in Experience Analytics.


Test The Report:


When you have successfully created your new report, open Experience Analytics and preview the report in a web browser.

To test the report:

  1. Open the Experience Analytics dashboard.

  2. Navigate to the relevant tab and select your new report.

    475D859164004A77A2282A31D05E3D4C.png
  3. If you do not see anything in your report, select a wider date range of data and all sites.


Comments