Skip to content

Commit

Permalink
DYN-6934 Address edge case where placing custom node would send Guid …
Browse files Browse the repository at this point in the history
…instead of node name as analytics (#15213)
  • Loading branch information
QilongTang authored May 14, 2024
1 parent a3b1e1e commit 1b6a2a4
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/DynamoCore/Models/RecordableCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1003,10 +1003,16 @@ protected override void SerializeCore(XmlElement element)

internal override void TrackAnalytics()
{
Dynamo.Logging.Analytics.TrackEvent(
Logging.Actions.Create,
Logging.Categories.NodeOperations,
(Node != null) ? Node.GetOriginalName() : Name ?? "");
// For custom nodes, Node is null until the node has been created
// Including the custom node cases should not be encouraged since
// GetOriginalName() will return the Guid of custom node
if (Node != null)
{
Logging.Analytics.TrackEvent(
Logging.Actions.Create,
Logging.Categories.NodeOperations,
Node.GetOriginalName() ?? string.Empty);
}
}

#endregion
Expand Down

0 comments on commit 1b6a2a4

Please sign in to comment.