Dashboard in Content Editor Core Database:
Presentation details and Layout of Dashboard :
Sitecore Charts Components :
Sitecore Dimension:
Dimension describes the data. Dimensions are attributes of your data.
For example, the dimension City indicates the city, for example, "Paris" or "New York", from which a session originates.
The dimension Page indicates the URL of a page that is viewed
From a development perspective, we think about the dimension as a grouping of the data- group by city, group by page, etc
Sitecore Metrics:
Metrics measure the data. In Sitecore there are 7 standard metrics that measure the different attributes of each dimension:
Visit, Value, Page Views, Time on site, Bounces, Conversion and count
Create your own dimension (also known as flexible dimensions) and collect metrics for it.
Exp analytics Filters ( Master database ) :
- You can choose Pages, Visits, or create your own subfolder.
- You create segments by combining a dimension with a filter.
Custom Report-All Visits by Operating system:
Create and configure the dimension item:
Duplicate one of the existing flexible dimensions.
For Example, Duplicate the "By device type" flexible dimension to "By Operating System".
In the Data section, in the Metric Type field, enter the name of the class you created.
Set below values:
Create a segment item
- In the Review tab, in the Workflow group, click Deploy. By default, this starts data collection for the segment 30 minutes after deployment.
<configuration xmlns:role="http://www.sitecore.net/xmlconfig/role/"> <sitecore role:require="Standalone or Processing"> | |
<experienceAnalytics> | |
<aggregation> | |
<!-- Sitecore.ExperienceAnalytics.Aggregation.FlexibleMetrics namespace | |
within Sitecore.ExperienceAnalytics.Aggregation.dll is your best friend --> | |
<flexibleDimensions> | |
<!-- Operating system / DON'T forget to deploy marketing definitions segments ;) / --> | |
<dimension id="{BC53C7C9-9C3D-4F3D-9253-FE5B59E7C777}" type="Sitecore.ExperienceAnalytics.Aggregation.FlexibleMetrics.Framework.FlexibleDimension`2[[CustomReport.Demo.FlexibleDimensions.OperatingSystemMetrics, CustomReport.Demo], [Sitecore.XConnect.Collection.Model.OperatingSystemData, Sitecore.XConnect.Collection.Model]], Sitecore.ExperienceAnalytics.Aggregation"> | |
<param type="CustomReport.Demo.FlexibleDimensions.OperatingSystemGroupResolver, CustomReport.Demo"/> | |
<param type="CustomReport.Demo.FlexibleDimensions.OperatingSystemFactCalculator, CustomReport.Demo"/> | |
<!-- No need for more params. IKeyComposer is marked as internal which limits us to using only this contructor of FlexibleDimension<TOutputValues, TInputEvents>. --> | |
<InteractionFilters hint="list"> | |
<!-- All implement IInteractionFilter -> bool ExcludeFromAggregation(Interaction interaction); | |
Basically these filters exclude some internal Sitecore interactions from aggregation and are used on all flexible dimensions --> | |
<InteractionFilter type="Sitecore.ExperienceAnalytics.Aggregation.Filters.ExmSyntheticEventFilter, Sitecore.ExperienceAnalytics.Aggregation"/> | |
<InteractionFilter type="Sitecore.ExperienceAnalytics.Aggregation.Filters.WebVisitFilter, Sitecore.ExperienceAnalytics.Aggregation"/> | |
</InteractionFilters> | |
</dimension> | |
</flexibleDimensions> | |
</aggregation> | |
</experienceAnalytics> | |
<settings> | |
<!-- EXPERIENCE ANALYTICS - AGGREGATION - SEGMENT DEPLOY DATE OFFSET PADDING | |
Controls additional padding when interaction's SaveDateTime is compared with segment's deploy date. | |
The timespan built from the value of this setting is added to the segment's deploy date. | |
When a segment is being deployed, the DeployDate will be DateTime.UtcNow.Add(SegmentDeployDateOffsetPadding) | |
Interaction data for the particular segment will be processed if interaction.SaveDateTime > segment.DeployDate | |
Default value: 00:30:00 (30 minutes) | |
Reduced to 10 sec for demo purpuses. --> | |
<setting name="ExperienceAnalytics.Aggregation.SegmentDeployDateOffsetPadding" value="00:00:10" /> | |
</settings> | |
</sitecore> | |
</configuration> |
Custom Metric class [ output ]: OperatingSystemMetrics.cs:
Add references to these libraries in your Visual Studio solution:
Sitecore.Analytics.Aggregation
Sitecore.ExperienceAnalytics.Aggregation
Sitecore.XConnect
Sitecore.Kernel
Sitecore.XConnect.Collection.Model
namespace CustomReport.Demo.FlexibleDimensions { | |
using Sitecore.Analytics.Aggregation.Data.Model; | |
using Sitecore.ExperienceAnalytics.Aggregation.FlexibleMetrics.Framework.Metrics; | |
using System; | |
// All implement this interface and inherit from this base class | |
public class OperatingSystemMetrics : DictionaryValue, IMergeableMetric<OperatingSystemMetrics> | |
{ | |
//Define properties for your metrics, for example Visits , MonetaryValue , and so on.
public int Visits { get; set; } | |
//Implement the MergeWith method. In this method,
// you specify how data that is calculated for a new interaction is merged into the already existing calculated data.
public T MergeWith<T>(T other) where T : OperatingSystemMetrics, new() | |
{ | |
if (other == null) | |
{ | |
throw new ArgumentNullException(nameof(other)); | |
} | |
T instance = Activator.CreateInstance<T>(); | |
instance.Visits = Visits + other.Visits; | |
return instance; | |
} | |
} | |
} |
param 1: OperatingSystemGroupResolver.cs
OperatingSystemData: the type of object you want to use as a key when you group records for your dimension.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
//Calculating our metrics values depending on input data
param 2: OperatingSystemFactCalculator.cs
Create_Fact_OperatingSystemMetrics_Table.sql
Naming: Fact_ YourDimensionNameMetrics_Table. When you create the table several columns are mandatory and required by Sitecore:
|
Comments
Post a Comment