From 122cd1160b0f0dbd8dd6c0797855cba1c67ea36f Mon Sep 17 00:00:00 2001 From: tombogle Date: Mon, 15 Dec 2025 17:53:02 -0500 Subject: [PATCH 1/2] Added DeviceUILanguage application property in support of "Top 5 Device Lang" metric --- DesktopAnalytics.sln.DotSettings | 1 + src/DesktopAnalytics/Analytics.cs | 16 ++++++++++++---- src/SampleApp/Program.cs | 5 +++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/DesktopAnalytics.sln.DotSettings b/DesktopAnalytics.sln.DotSettings index 484cf45..ad4e755 100644 --- a/DesktopAnalytics.sln.DotSettings +++ b/DesktopAnalytics.sln.DotSettings @@ -1,6 +1,7 @@  API IO + UI True True True diff --git a/src/DesktopAnalytics/Analytics.cs b/src/DesktopAnalytics/Analytics.cs index adf58ad..b06a4be 100644 --- a/src/DesktopAnalytics/Analytics.cs +++ b/src/DesktopAnalytics/Analytics.cs @@ -220,8 +220,8 @@ public Analytics(string apiSecret, UserInfo userInfo, Dictionary a + "." + b); + var versionNumberWithBuild = assembly?.GetName().Version?.ToString() ?? ""; + var versionNumber = versionNumberWithBuild.Split('.').Take(2).Aggregate((a, b) => a + "." + b); SetApplicationProperty("Version", versionNumber); SetApplicationProperty("FullVersion", versionNumberWithBuild); SetApplicationProperty("UserName", GetUserNameForEvent()); @@ -229,8 +229,16 @@ public Analytics(string apiSecret, UserInfo userInfo, Dictionary(args[1], true, out var clientType)) { - Console.WriteLine($"Usage: SampleApp {Environment.NewLine}Unrecoginzed client type: {args[1]}"); + Console.WriteLine($"Usage: SampleApp {Environment.NewLine}Unrecognized client type: {args[1]}"); return 1; } @@ -29,7 +29,8 @@ static int Main(string[] args) Email="john@example.com", UILanguageCode= "fr" }; - userInfo.OtherProperties.Add("HowIUseIt","This is a really long explanation of how I use this product to see how much you would be able to extract from Mixpanel.\r\nAnd a second line of it."); + userInfo.OtherProperties.Add("HowIUseIt", + "This is a really long explanation of how I use this product to see how much you would be able to extract from Mixpanel.\r\nAnd a second line of it."); var propsForEveryEvent = new Dictionary {{"channel", "beta"}}; using (new Analytics(args[0], userInfo, propertiesThatGoWithEveryEvent: propsForEveryEvent, clientType: clientType)) From b42c993123a32076d781b2268efb8d0ee5b49ca2 Mon Sep 17 00:00:00 2001 From: tombogle Date: Tue, 6 Jan 2026 16:21:14 -0500 Subject: [PATCH 2/2] Decided that CurrentUICulture is probably a better fit for our needs than InstalledUICulture --- src/DesktopAnalytics/Analytics.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DesktopAnalytics/Analytics.cs b/src/DesktopAnalytics/Analytics.cs index b06a4be..2c5e5c4 100644 --- a/src/DesktopAnalytics/Analytics.cs +++ b/src/DesktopAnalytics/Analytics.cs @@ -231,7 +231,7 @@ public Analytics(string apiSecret, UserInfo userInfo, Dictionary