+ Add First open time user-property
							parent
							
								
									2cc9d66aa1
								
							
						
					
					
						commit
						cd3c53d674
					
				| 
						 | 
					@ -310,17 +310,6 @@ namespace Guru
 | 
				
			||||||
            SetUserProperty("sdk_version", Version);
 | 
					            SetUserProperty("sdk_version", Version);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        private static void LogFirebaseDeps(bool success)
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            Analytics.Track(Consts.EventSDKInfo, new Dictionary<string, dynamic>()
 | 
					 | 
				
			||||||
            {
 | 
					 | 
				
			||||||
                { Consts.ParameterItemName, $"fbs_done_{(success ? "true" : "false")}" },
 | 
					 | 
				
			||||||
            }, new Analytics.EventSetting()
 | 
					 | 
				
			||||||
            {
 | 
					 | 
				
			||||||
                EnableFirebaseAnalytics = true,
 | 
					 | 
				
			||||||
            });
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        #endregion
 | 
					        #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        #region 经济打点
 | 
					        #region 经济打点
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -113,10 +113,22 @@ namespace Guru
 | 
				
			||||||
        public static void Init(GuruSDKInitConfig config, Action<bool> onComplete)
 | 
					        public static void Init(GuruSDKInitConfig config, Action<bool> onComplete)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            _initTime = DateTime.Now.ToUniversalTime();
 | 
					            _initTime = DateTime.Now.ToUniversalTime();
 | 
				
			||||||
 | 
					            // ----- First Open Time -----
 | 
				
			||||||
 | 
					            Analytics.SetUserProperty(Analytics.FirstOpenTime, GetFirstOpenTime());
 | 
				
			||||||
            LogI($"#1 ---- Guru SDK [{Version}] ----\n{config.ToString()}");
 | 
					            LogI($"#1 ---- Guru SDK [{Version}] ----\n{config.ToString()}");
 | 
				
			||||||
            Instance.StartWithConfig(config, onComplete);
 | 
					            Instance.StartWithConfig(config, onComplete);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        private static string GetFirstOpenTime()
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            string firstOpenTime = IPMConfig.FirstOpenTime;
 | 
				
			||||||
 | 
					            if (string.IsNullOrEmpty(firstOpenTime))
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                firstOpenTime = TimeUtil.GetCurrentTimeStamp().ToString();
 | 
				
			||||||
 | 
					                IPMConfig.FirstOpenTime = firstOpenTime;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            return firstOpenTime;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
        /// 启动SDK
 | 
					        /// 启动SDK
 | 
				
			||||||
| 
						 | 
					@ -163,6 +175,8 @@ namespace Guru
 | 
				
			||||||
            _onCompleteCallback?.Invoke(true);
 | 
					            _onCompleteCallback?.Invoke(true);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        private void OnUserAuthResult(bool success)
 | 
					        private void OnUserAuthResult(bool success)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            if (success && string.IsNullOrEmpty(IPMConfig.IPM_UID))
 | 
					            if (success && string.IsNullOrEmpty(IPMConfig.IPM_UID))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -26,7 +26,8 @@ namespace Guru.Debug.Tests
 | 
				
			||||||
                    $"receipt_{i}", 
 | 
					                    $"receipt_{i}", 
 | 
				
			||||||
                    $"order_id_{i}", 
 | 
					                    $"order_id_{i}", 
 | 
				
			||||||
                    DateTime.Now.ToString("g"), 
 | 
					                    DateTime.Now.ToString("g"), 
 | 
				
			||||||
                    level));
 | 
					                    level, 
 | 
				
			||||||
 | 
					                    "RMB", 6.99d, "Store"));
 | 
				
			||||||
                
 | 
					                
 | 
				
			||||||
                level++;
 | 
					                level++;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue