New to Telerik UI for WinFormsStart a free 30-day trial

Application Analytics

Updated over 6 months ago

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 occurred during the execution. Using Analytics you will be able to trace certain features of the controls and get statistics about their usage.

This article will discuss the following topics:

With the discontinuation of the Telerik Platform as of R2 2018 SP1 (version 2018.2.621) we've also removed the two dependent assemblies from our suite - EQATEC.Analytics.Monitor.dll and Telerik.WinControls.Analytics.dll. The respective NuGet packages have been removed as well. Instead, the ITraceMonitor interface should be used as explained below.

ITraceMonitor Interface

With the R1 2014 release UI for WinForms exposes the ITraceMonitor interface which represents a monitor receiving trace events from the UI for WinForms controls.

You need to implement the following methods in order to receive trace events from the controls used in your application:

  • 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.

Once you've created your implementation of the interface in accordance to your provider of choice you need to set the static TraceMonitor.AnalyticsMonitor property as per the example below.

ITraceMonitor Instance

C#
ControlTraceMonitor.AnalyticsMonitor = new CustomAnalitycsMonitor();

How Analytics Works

Each control has analytics enabled by default, on control basis analytics can be disabled by setting the control`s EnableAnalytics property to false. Having analytics enabled, all one needs to do to start tracing the application usage is to set the AnalyticsName property for each control. Note that the value which is set will be used in the dashboard.

Set AnalyticsName

C#
this.radButton1.EnableAnalytics = true; // default value
this.radButton1.AnalyticsName = "Save Button";

You can then go to the dashboard of your analytics provider, where you will find information and statistics for the registered features for different periods of time.

Disable Analytics

C#
this.radButton1.EnableAnalytics = false;

Traceable Features

Currently only 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. You can find below a list of the controls and their features that support tracing:

ControlTraceable events and methods
ColorPickerSelectionChanged
RadAutocompleteBoxInsertText
RadBindingNavigatorMoveToFirst, MoveToPrevious, MoveToNext, MoveToLast
RadButtonClick
RadBulletGraphValueChanged
RadCalendarSelectionChaned, Navigation, ViewChanged
RadCarouselSelection
RadChartViewZoom, Pan, SelectionChanged
RadCheckedDropDownListChecked, Popup open close
RadCollapsiblePanelExpand, Collapse
RadColorBoxSelectionChanged
RadContextMenuOpen, Close, Click (RadContextMenu.DropDown)
RadDataEntryEditing, Insert/Delete, MoveToFirst, MoveToPrevious, MoveToNext, MoveToLast
RadDataLayoutCustomize open, Item rearrange (via drag and drop, resize or context menu)
RadDateTimePickerValueChanged
RadDiagramMove, Resize, Add, Delete
RadDockSave layout, Load layout, Float a pane, Dock a pane, Add window, Remove window
RadDropDownButtonDropDownOpened, DropDownClosed
RadDropdownListSelectionChanged, DropDownOpened, DropDownClosed
RadFormSelectionChanged, DropDownOpened, DropDownClosed
RadGanttViewCollapse task, Expand task, Edit task, Selected task
RadGridViewMoveToFirst, MoveToPrevious, MoveToNext, MoveToLast,
RadGridView - PagingMoveToFirst, MoveToPrevious, MoveToNext, MoveToLast
RadLayoutControlCustomize open, Item rearrange (via drag and drop, resize or context menu)
RadLinearGaugeValueChanged
RadListControlSelectionChanged
RadMasketEditBoxSelectionChanged
RadMenuClick
RadPageView - ExplorerBarExpand, Collapse, SelectionChanged
RadPageView - StripSelectionChanged
RadPanoramaReordering, Scrolling
RadPdfViewerLoad Document, Print, Print Preview
RadPivotGridBegin refresh, Complete refresh, Expand group header, Collapse group header, DragDrop field, Export
RadPopupEditorPopup open close
RadPropertyGridSorting, Grouping, Editing, Searching, Expanding Groups, Expanding nested definition
RadRadialGaugeValueChanged
RadRadioButtonChecked, Unchecked
RadRibbonBarSelectionChanged
RadRichTextBoxOpen Document, Save Document
RadRichTextEditorNew, Open, Save, Print, PrintPreview
RadSchedulerViewChanged, Import, Export, Editing, Creating, DragAndDrop, Resize, ShowDialog
RadSpinEditorSelectionChanged
RadSpreadSheetOpen Document, Save Document, Hyperlink Click
RadTimePickerValueChanged
RadToggleButtonChecked, Unchecked
RadToggleSwitchChecked, Unchecked
RadTrackBarSelectionChanged
RadTreeViewSelect, Expand/Collapse, SelectionChanged, Edit, NodeRemoved
RadWaitingBarStartWaiting, EndWaiting
Exporting features in controlsAll export providers(including async exports) - when export operation is completed