In previous recipes, you learned how to create simple dimensions, where every interaction in a visit had a common key to aggregate browser details. In this recipe, you will learn how to create dimensions where interactions in each visit can have different keys. We will consider an example of creating a detailed report based on website sections, where a visitor can visit pages from different sections of the website in a visit.
First, we will create dimension and segment definition items:
Create a new segment and dimension in the
/sitecore/system/Marketing Control Panel/Experience Analytics/Dimensions/Pages
item, as shown in the following image. Now deploy this segment:Now we will create a
Dimension
class, which will actually process xDB data. In theSitecoreCookbook
project, create a newByWebsiteSection
class in theDimensions
folder in theAnalytics
folder and inherit it from theDimensionBase
class and create...