Sitecore Experience Analytics provides dashboards and reports for marketers and marketing analysts to identify patterns and trends in experience data. This data is collected from websites and other external data sources.
You can create an experience analytics report from scratch using Microsoft Visual Studio and Sitecore Rocks.
This walkthrough outlines how to:
- Create a new report page item
- Add a chart component to a report
- Add a parameters item to the report
- Bind the bar chart control to the parameters item
- Change the chart title
- Test the report
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. This is due to possible changes in standard reports in future versions of Sitecore.
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.
You need to install Microsoft Visual Studio with Sitecore Rocks, and a suitable Sitecore website to complete this task.
To create a report page:
- Open Sitecore Rocks and create a connection to your website.
- In the website content tree, navigate to the Dashboard node using the following path:
- 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.
- 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 experienceanalytics.
- Select the ExperienceAnalyticsReportPage. You can accept the default name or provide a name for the item, for example, TestReportPage.
- 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.
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:
- In Sitecore Rocks, right-click a report page, click Tasks and then click Design Layout.
- In the Design Layout window, click Add Rendering.
- In the Select Rendering dialog box, select a chart control to use in your report page.
To find all available chart controls, enter a search term beginning with experienceanalytics. You can choose from an area chart, bar chart, list, or line chart. For example, to display a bar chart, select the ExperienceAnalyticsBarChart rendering.
- 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
To add a parameters item:
- 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 experienceanalytics. You can see parameters items for each type of chart control. For example, if you are using the bar chart control, select the ExperienceAnalyticsBarChart Parameters item.
- You can enter a name for your parameters item or accept the default name, then click OK.
- To configure the parameters item, double click the item to open it.
- In the parameters item, select a metric and add a segment to your chart.
- For example, to show conversions from all visits by country, select the following:
- Metric = Conversions
- Segment = All visits by Country
- Save your changes.
Bind the bar chart control to the parameters item
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:
- Right-click the report, click Task, Design Layout, and then double-click the chart item that you have created. For example, double click the ExperienceAnalyticsBarChart control.
- In the Edit Rendering Properties dialog box, in the Behavior section, in Data Source, browse to the location of the ExperienceAnalyticsBarChart Parameters item in the content tree.
- Select the parameters item and click OK.
- 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:
- Double-click the parameters item for your chart.
- In the parameters item, expand the Appearance section.
- In the Title field, enter the relevant title, for example, Conversions by country.
- 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:
- Open the Experience Analytics dashboard.
- Navigate to the relevant tab and select your new report.
- If you do not see anything in your report, select a wider date range of data and all sites.