private static void TrackWithApplicationProperties(string eventName, Properties properties = null)
{
if (_singleton == null)
{
throw new ApplicationException("The application must first construct a single Analytics object");
}
if (properties == null)
properties = new Properties();
foreach (var p in _singleton._propertiesThatGoWithEveryEvent)
{
if (properties.ContainsKey(p.Key))
properties.Remove(p.Key);
properties.Add(p.Key, p.Value ?? string.Empty);
}
Segment.Analytics.Client.Track(AnalyticsSettings.Default.IdForAnalytics, eventName, properties);
}