Skip to content

Commit d7ea877

Browse files
authored
Feature: Track actions in AppCenter (#12195)
1 parent 0881c5f commit d7ea877

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Files.App/Commands/Manager/CommandManager.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using CommunityToolkit.Mvvm.DependencyInjection;
66
using Files.App.Actions;
77
using Files.Backend.Services.Settings;
8+
using Microsoft.AppCenter.Analytics;
89
using Microsoft.UI.Xaml;
910
using Microsoft.UI.Xaml.Controls;
1011
using Microsoft.UI.Xaml.Input;
@@ -464,7 +465,10 @@ public ActionCommand(CommandManager manager, CommandCodes code, IAction action)
464465
public async Task ExecuteAsync()
465466
{
466467
if (IsExecutable)
468+
{
469+
Analytics.TrackEvent($"Triggered {Action.Label} action");
467470
await Action.ExecuteAsync();
471+
}
468472
}
469473

470474
public async void ExecuteTapped(object sender, TappedRoutedEventArgs e) => await ExecuteAsync();

0 commit comments

Comments
 (0)