Skip to content

Commit

Permalink
DYN-6965 Add analytics to track nodes with missing documentation (#15287
Browse files Browse the repository at this point in the history
)
  • Loading branch information
zeusongit authored Jun 5, 2024
1 parent 01a8539 commit 56f13e7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/DocumentationBrowserViewExtension/MarkdownHandler.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.IO;
using Dynamo.Logging;
using Dynamo.Utilities;

namespace Dynamo.DocumentationBrowser
Expand Down Expand Up @@ -69,6 +70,12 @@ internal string ParseToHtml(string nodeNamespace, string packageName)
if (string.IsNullOrWhiteSpace(mdString))
return string.Empty;
}
else
{
var nodeName = string.IsNullOrEmpty(packageName) ? nodeNamespace : "Package:" + packageName + " " + nodeNamespace;
//if in-depth documentatiuon is not available, do not show any additional message, but log it for analytics
Analytics.TrackEvent(Actions.MissingDocumentation, Categories.NodeContextMenuOperations, nodeName);
}

var html = converter.ParseMd2Html(mdString, mdFilePath);
return html;
Expand Down
5 changes: 5 additions & 0 deletions src/NodeServices/IAnalyticsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,11 @@ public enum Actions
/// </summary>
ViewDocumentation,

/// <summary>
/// When the in-depth node help documentation is un-available
/// </summary>
MissingDocumentation,

/// <summary>
/// Cancel operation, e.g. cancel adding a new group style
/// </summary>
Expand Down

0 comments on commit 56f13e7

Please sign in to comment.