diff --git a/src/Model/ApiKey.cs b/src/Model/ApiKey.cs new file mode 100644 index 00000000..77f283e9 --- /dev/null +++ b/src/Model/ApiKey.cs @@ -0,0 +1 @@ +namespace XmlNotepad { public partial class AppAnalytics { private const string ApiKey=""; } } diff --git a/src/Model/AppAnalytics.cs b/src/Model/AppAnalytics.cs index d431a769..69571542 100644 --- a/src/Model/AppAnalytics.cs +++ b/src/Model/AppAnalytics.cs @@ -22,7 +22,7 @@ public partial class AppAnalytics public AppAnalytics(string clientId, bool enabled) { this._clientId = clientId; - this._enabled = enabled; + this._enabled = enabled && !string.IsNullOrEmpty(ApiKey); } private async void SendMeasurement(string path, string title)