Пример #1
0
 public static void TrackWithMetaMatomo(this SpeckleApiClient speckleApiClient, string category, string action, string name = "", string value = "")
 {
     if (piwikTracker == null)
     {
         Initialize();
     }
     try
     {
         piwikTracker.SetUserId(TelemetryUtilities.ComputeSHA256Hash(speckleApiClient.User.Email));
         var properties = speckleApiClient.GetTrackClientProperties();
         TrackCustomMatomo(category, action, name, value, properties);
     }
     catch { }
 }
Пример #2
0
        public static void TrackWithMetaAmplitude(this SpeckleApiClient speckleApiClient, string trackName)
        {
            if (!LocalContext.GetTelemetrySettings())
            {
                return;
            }

            try
            {
                var properties = speckleApiClient.GetTrackClientProperties();
                properties.Add("object_num", speckleApiClient.GetNumberOfObjects().ToString());
                var user_email = TelemetryUtilities.ComputeSHA256Hash(speckleApiClient.User.Email);
                TrackAmplitudeAsync(requestUri, api_key, user_email, properties, trackName);
            }
            catch { }
        }