diff --git a/src/DynamoCoreWpf/Views/HomePage/HomePage.xaml.cs b/src/DynamoCoreWpf/Views/HomePage/HomePage.xaml.cs
index 84685fe5def..c9e8d229d3a 100644
--- a/src/DynamoCoreWpf/Views/HomePage/HomePage.xaml.cs
+++ b/src/DynamoCoreWpf/Views/HomePage/HomePage.xaml.cs
@@ -66,11 +66,12 @@ public HomePage()
InitializeComponent();
InitializeGuideTourItems();
- dynWebView = new DynamoWebView2();
+ dynWebView = new DynamoWebView2
+ {
+ Margin = new System.Windows.Thickness(0), // Set margin to zero
+ ZoomFactor = 1.0 // Set zoom factor (optional)
+ };
- dynWebView.Margin = new System.Windows.Thickness(0); // Set margin to zero
- dynWebView.ZoomFactor = 1.0; // Set zoom factor (optional)
-
HostGrid.Children.Add(dynWebView);
// Bind event handlers
@@ -81,7 +82,7 @@ public HomePage()
RequestNewCustomNodeWorkspace = NewCustomNodeWorkspace;
RequestShowSampleFilesInFolder = ShowSampleFilesInFolder;
RequestShowBackupFilesInFolder = ShowBackupFilesInFolder;
- RequestShowTemplate = ShowTemplate;
+ RequestShowTemplate = OpenTemplate;
RequestApplicationLoaded = ApplicationLoaded;
DataContextChanged += OnDataContextChanged;
@@ -127,7 +128,7 @@ private void DynamoViewModel_PropertyChanged(object sender, System.ComponentMode
/// This is used before DynamoModel initialization specifically to get user data dir
///
///
- private string GetUserDirectory()
+ private static string GetUserDirectory()
{
var version = AssemblyHelper.GetDynamoVersion();
@@ -230,12 +231,14 @@ internal bool ProcessUri(string uri)
if (filePath.EndsWith(".dyn") || filePath.EndsWith(".dyf"))
{
OpenFile(filePath);
+ Logging.Analytics.TrackEvent(Logging.Actions.Open, Logging.Categories.DynamoHomeOperations, "Workspace");
return true;
}
}
else
{
Process.Start(new ProcessStartInfo(uri) { UseShellExecute = true });
+ Logging.Analytics.TrackEvent(Logging.Actions.Open, Logging.Categories.DynamoHomeOperations, "Hyper Link: "+ uri);
}
return false;
@@ -412,11 +415,14 @@ internal void StartGuidedTour(string path)
}
ShowGuidedTour(path);
+ Logging.Analytics.TrackEvent(Logging.Actions.Start, Logging.Categories.DynamoHomeOperations, "Guided Tour: " + path);
+
}
internal void NewWorkspace()
{
this.startPage?.DynamoViewModel?.NewHomeWorkspaceCommand.Execute(null);
+ Logging.Analytics.TrackEvent(Logging.Actions.New, Logging.Categories.DynamoHomeOperations, "Workspace");
}
internal void OpenWorkspace()
@@ -428,6 +434,7 @@ internal void OpenWorkspace()
}
this.startPage?.DynamoViewModel?.ShowOpenDialogAndOpenResultCommand.Execute(null);
+ Logging.Analytics.TrackEvent(Logging.Actions.Open, Logging.Categories.DynamoHomeOperations, "Workspace");
}
internal void NewCustomNodeWorkspace()
@@ -439,6 +446,7 @@ internal void NewCustomNodeWorkspace()
}
this.startPage?.DynamoViewModel?.ShowNewFunctionDialogCommand.Execute(null);
+ Logging.Analytics.TrackEvent(Logging.Actions.New, Logging.Categories.DynamoHomeOperations, "Custom Node Workspace");
}
internal void ShowSampleFilesInFolder()
@@ -453,6 +461,8 @@ internal void ShowSampleFilesInFolder()
Process.Start(new ProcessStartInfo("explorer.exe", "/select,"
+ this.startPage.SampleFolderPath)
{ UseShellExecute = true });
+ Logging.Analytics.TrackEvent(Logging.Actions.Show, Logging.Categories.DynamoHomeOperations, "Sample Files");
+
}
internal void ShowBackupFilesInFolder()
@@ -466,9 +476,10 @@ internal void ShowBackupFilesInFolder()
Process.Start(new ProcessStartInfo("explorer.exe", this.startPage.DynamoViewModel.Model.PathManager.BackupDirectory)
{ UseShellExecute = true });
+ Logging.Analytics.TrackEvent(Logging.Actions.Show, Logging.Categories.DynamoHomeOperations, "Backup Files");
}
- internal void ShowTemplate()
+ internal void OpenTemplate()
{
if (DynamoModel.IsTestMode)
{
@@ -477,12 +488,15 @@ internal void ShowTemplate()
}
// Equivalent to CommandParameter="Template"
- this.startPage?.DynamoViewModel?.ShowOpenTemplateDialogCommand.Execute("Template");
+ this.startPage?.DynamoViewModel?.ShowOpenTemplateDialogCommand.Execute("Template");
+ Logging.Analytics.TrackEvent(Logging.Actions.Open, Logging.Categories.DynamoHomeOperations, "Template");
}
internal void ApplicationLoaded()
{
- LoadingDone();
+ LoadingDone();
+ Logging.Analytics.TrackEvent(Logging.Actions.Load, Logging.Categories.DynamoHomeOperations);
+
}
#endregion
diff --git a/src/NodeServices/IAnalyticsClient.cs b/src/NodeServices/IAnalyticsClient.cs
index 6f5e4081a26..67e979a5182 100644
--- a/src/NodeServices/IAnalyticsClient.cs
+++ b/src/NodeServices/IAnalyticsClient.cs
@@ -9,6 +9,9 @@ namespace Dynamo.Logging
///
public enum Categories
{
+ /// XXXOperations usually means actions from Dynamo users
+ /// v.s. XXX usually means actions from the Dynamo component itself
+
///
/// Events Category related to application lifecycle
///
@@ -142,7 +145,12 @@ public enum Categories
///
/// Events Category related to DynamoMLDataPipeline
///
- DynamoMLDataPipelineOperations
+ DynamoMLDataPipelineOperations,
+
+ ///
+ /// Events Category related to DynamoHome
+ ///
+ DynamoHomeOperations
}
///