Analytics Support
When you are creating an application for a broad audience, integrating some kind of analytics framework is crucial, because you will need to analyze the usage data of the application and its features and most probably you will need to know about any application crashes or other errors that occurred during the execution. Using analytics you will be able to trace certain features of the controls and get statistics about their usage.
The analytics support is implemented through the TraceMonitor
static class and its AnalyticsMonitor
. To enable this feature, the ITraceMonitor
interface should be implemented and assigned to the TraceMonitor.AnalyticsMonitor
property.
Implementing ITraceMonitor
The ITraceMonitor
interface provides the following set of methods.
-
TrackAtomicFeature
: This method is called when an atomic feature is executed. -
TrackFeatureStart
: This method is called when a feature is initiated. -
TrackFeatureEnd
: This method is called when a feature finishes execution. -
TrackFeatureCancel
: This method is called when a feature is canceled. -
TrackError
: Traces an error in a specified feature. -
TrackValue
: This method is called when a value connected with a specific feature is tracked.
The methods are invoked automatically by some of the Telerik controls (the ones supporting the trace monitor). A different method will be called based on the executed action. For all other cases (where Telerik doesn't automatically call the methods), you can call the methods manually on the corresponding action.
Implementing the ITraceMonitor
TraceMonitor.AnalyticsMonitor
property.
Setting the TraceMonitor.AnalyticsMonitor
To include a control in the analytics tracking, set the Analytics.Name
attached property on it.
Setting Analytics.Name property
RadButton
the TrackAtomicFeature
method of the ITraceMonitor
will be invoked. The feature
string will be "SelectButton.Click". Opening and closing the RadComboBox
will call the TrackAtomicFeature
method with the feature
set to "ComboBoxSelection.DropDownOpened" and "ComboBoxSelection.DropDownClosed".
The different Telerik controls will report different actions and may use the other methods of the monitor.
To add a feature tracking outside of the features tracked by default, you can manually call the methods of the ITraceMonitor
.
Tracking features manually
Traceable Features in Telerik Controls
Currently, only a few controls support analytics out of the box. Note that only user interactions will be tracked - initial values and values from bindings are not supported.
Supported controls and features
Feature Action | Feature Name |
---|---|
RadBusyIndicator | |
Show | ShowIndicator |
RadCalendar | |
SelectionChanged | SelectionChanged |
RadCarousel | |
SelectionChanged | SelectionChanged |
RadColorEditor | |
SelectionChanged | SelectionChanged |
RadColorPicker | |
SelectionChanged | SelectionChanged |
RadComboBox | |
SelectionChanged | SelectionChanged |
DropDownOpened | DropDownOpened |
DropDownClosed | DropDownClosed |
RadContextMenu | |
Open | Opened |
Close | Closed |
Click | Click |
RadDropDownButton | |
DropDownOpened | DropDownOpened |
DropDownClosed | DropDownClosed |
RadExpander | |
Expanded | Expanded |
Collapsed | Collapsed |
RadGridView | |
Sort | Sorted |
Group | Grouped |
Filter | Filtered |
SelectionChanged | SelectionChanged |
RadListBox | |
SelectionChanged | SelectionChanged |
RadMenu | |
Click | Click |
RadRadioButton | |
Checked | Checked |
UnChecked | UnChecked |
RadRibbonView | |
SelectionChanged | SelectionChanged |
RadRichTextBox | |
Open Document | Open Document |
Save Document | Save Document |
RadSpreadsheet | |
Open Document | Open Document |
Save Document | Save Document |
Load Image | LoadImage |
Save Image | SaveImage |
RadTabControl | |
SelectionChanged | SelectionChanged |
RadTileView | |
SelectionChanged | SelectionChanged |
RadToggleButton | |
Checked | Checked |
UnChecked | UnChecked |
RadTreeListView | |
Sort | Sorted |
Group | Grouped |
Filter | Filtered |
SelectionChanged | SelectionChanged |
RadTreeView | |
SelectionChanged | SelectionChanged |
RadVirtualGrid | |
SelectionChanged | SelectionChanged |
With the discontinuation of the Telerik Platform as of R2 2018 SP1 we've also removed the two dependent assemblies from our suite - EQATEC.Analytics.Monitor.dll and Telerik.Windows.Analytics.dll. The respective NuGet packages have been removed as well. Instead, the ITraceMonitor interface should be used as explained below.