There is a new nice and interesting feature, at least from my point of view, built-in in Radical: Official documentation

Customer Improvement Program

Have you ever thought how important is, from the perspective of an application producer, us, to know what our end users do with the application they use?

  • we plan a feature;
  • we invest money in building a feature;
  • we deploy a feature;

…and we do not know nothing about how the user utilizes the feature we invested on, we do not even know if the user utilizes it.

AnalyticsServices.UserActionTrackingHandler = evt =>
//every user action will be dispatched here asynchronously

AnalyticsServices.IsEnabled = true;

Writing the above code at the application startup enables the Radical AnalyticsServices what happens is that all the code that in some way invokes a DelegateCommand, in a WPF MVVM based application, will be tracked and we have the opportunity to “save” what the user is doing in order to analyze it later.

What the UserActionTrackingHandler receives is an AnalyticsEvent with the following shape:

public class AnalyticsEvent
public AnalyticsEvent()
this.ExecutedOn = DateTimeOffset.Now;
this.Identity = Thread.CurrentPrincipal.Identity;

public DateTimeOffset ExecutedOn { get; set; }

public String Name { get; set; }

public Object Data { get; set; }

public IIdentity Identity { get; set; }

If you need you can define your own events inheriting from the AnalyticsEvent class and in order to plugin your events you only need to declare a dependency on the IAnalyticsServices service:

public interface IAnalyticsServices
Boolean IsEnabled { get; set; }
void TrackUserActionAsync( Analytics.AnalyticsEvent action );

And each time you call TrackUserActionAsync your UserActionTrackingHandler will be invoked.

Be aware that this is still a preview subject to change.