Create a custom report filter and segment


How to create your own dimensions and filters to use in reports.

In Experience Analytics, you use dimensions and segments to create charts used in reports.

Dimensions and segments work together to define the data available in the reports. Dimensions determine how visits are analyzed, segments control which visits are analyzed. For example, you could have a dimension called By Goal and then a segment below it called All visits by Goal.

Experience Analytics comes with several default dimensions, and segments, but you can also add your own if your business requires it. You can create segments by combining a dimension with a filter.

You can also create new segments in Sitecore but creating new dimensions is a developer task.

To create a custom report filter and segment:

In the Content Editor, you can create a filter to use with segments.

To create a new filter item:

  1. In the Content Editor, navigate to the folder /sitecore/system/Marketing Control Panel/Experience Analytics/Filters.

  2. In the Sitecore ribbon, on the Home tab, in the Insert group, click Filter.

  3. In the Message dialog box, enter a name for your filter, for example, My Filter and click OK.

  4. Click Save. To configure your new filter item, in the right pane, in the Data section, click Edit Rule.

  5. To create a rule for your filter, in the Create rule dialog box, select a condition. For example, you can create a filter for a report that displays statistics on a contact that has downloaded a brochure from your website. To do this, in the Choose conditions field, search for Asset, and then select the rule where the Asset was downloaded.

  6. To select the asset, in the Edit rule section, in the Rule 1 field, click the underlined word Asset.

  7. In the Select Item dialog box, navigate to the folder where your asset is located, and select the asset. Click OK.

  8. In the right pane, in the interaction segmentation section, click the add visit to segment action.

  9. Click OK to save the rule.

The next step is to create a segment item to link your new filter to.

To create a segment for your filter:

  1. In the Content Editor, in the content tree, expand the Dimensions item (/sitecore/system/Marketing Control Panel/Experience Analytics/Dimensions) and click the Email Obsolete, Pages or Visits folder where dimensions are located.

  2. Click the appropriate dimension to add your custom segment to, for example, the By Download dimension.

  3. In the Sitecore ribbon, on the Home tab, in the Insert group, click Segment to create a custom segment item, and in the Message dialog box enter a name, for example, My Segment and then click OK.

  4. To connect your custom segment to your custom filter, in the right pane, in the Data section, in the Filter field, click the drop down arrow and select the filter that you created earlier, and then click Save.

  5. In the Sitecore ribbon, in the Review tab, in the Workflow group, click Deploy to save your changes and start data collection for this segment. By default, data collection starts 30 minutes after deployment.


Once you have deployed a new segment and data collection has begun you cannot change the segment as this could cause inconsistencies in your collected data.

By default, historical data is calculated through a process called reaggregation, and is scheduled to begin daily at 1:00am.

In Sitecore Rocks, add your new custom segment to an existing report:

  1. In Sitecore Rocks, navigate to the report that you want to edit. For example, navigate to: <sitename>core/sitecore/client/Applications/ExperienceAnalytics/Dashboard/Behavior/Downloads/PageSettings/Downloads

  2. Select a line chart control to edit. To do this for the Download report, right click Asset, click Tasks then click Design Layout.

  3. To edit a line chart control, right click the relevant line chart and then click Edit Data Source, for example, the AssetCountAndValuePerVisit line chart.

    In the Data group, you can see the new custom segment that you created under Segments in the Dimensions folder.

  4. Select the custom filter and then click the right arrow button to make the custom segment visible in a chart.

  5. In Visual Studio, Sitecore Rocks, save your changes.

  6. In Experience Analytics, you can view the changes to the report.