update: 调整 FirebaseLogin 后用户登录方式的属性上报位置
Signed-off-by: huyufei <yufei.hu@castbox.fm>
							parent
							
								
									a768b1de90
								
							
						
					
					
						commit
						95271aaa98
					
				|  | @ -125,6 +125,8 @@ namespace Guru | |||
| 		public const string PropertyNoAds = "no_ads"; // 玩家是否去广告 | ||||
| 		public const string PropertyATTStatus = "att_status";  // ATT 状态 | ||||
| 		public const string PropertyGDPR = "gdpr"; // GDPR状态 | ||||
| 		public const string PropertySignUpMethod = "sign_up_method"; // 用户登录方式 | ||||
| 
 | ||||
| 		 | ||||
| 		// 经济相关 | ||||
| 		public const string ParameterBalance = "balance"; // 用于余额 | ||||
|  |  | |||
|  | @ -23,7 +23,6 @@ namespace Guru | |||
| 	    // private const string VALUE_NOT_FOR_IOS = "not_support_for_ios"; | ||||
| 	    // private const string VALUE_ONLY_FOR_IOS = "idfa_only_for_ios"; | ||||
| 	     | ||||
| 	    private static bool IsDebug { get; set; } = false; | ||||
| 	    private static bool _isGuruAnalyticInitOnce = false; | ||||
| 
 | ||||
| 	    public static void InitGuruAnalyticService(string firebaseId) | ||||
|  | @ -33,11 +32,6 @@ namespace Guru | |||
| 
 | ||||
| 		    try | ||||
| 		    { | ||||
| #if UNITY_EDITOR | ||||
| 			    IsDebug = true; | ||||
| #else | ||||
| 				IsDebug = initConfig.isDebug; | ||||
| #endif | ||||
| 			    string appId = IPMConfig.IPM_X_APP_ID; | ||||
| 			    string deviceInfo = new DeviceInfoData().ToString(); | ||||
| 
 | ||||
|  | @ -54,7 +48,7 @@ namespace Guru | |||
| 			     | ||||
| 			    GuruAnalytics.Init(appId, deviceInfo, () => | ||||
| 			    { | ||||
| 				    SetUserProperty(GuruAnalyticsConfig.KEY_GURU_ANALYTICS_EXP, GuruAnalytics.Instance.ExpGroupId); | ||||
| 				    SetUserProperty(GuruAnalyticsConfigManager.KEY_GURU_ANALYTICS_EXP, GuruAnalytics.Instance.ExperimentGroupId); | ||||
| 				    OnGuruAnalyticsInitComplete(); | ||||
| 			    }, IsDebug); // Android 初始化	 | ||||
| 			    UpdateAllUserProperties(); | ||||
|  |  | |||
|  | @ -45,7 +45,7 @@ namespace Guru | |||
| 		private static bool _isInitOnce;				//Analytics是否初始化完成 | ||||
| 		public static bool EnableDebugAnalytics;	//允许Debug包上报打点 | ||||
| 
 | ||||
| 		public static bool IsDebugMode => PlatformUtil.IsDebug(); | ||||
| 		private static bool IsDebug => PlatformUtil.IsDebug(); | ||||
| 		private static bool IsFirebaseReady => FirebaseUtil.IsFirebaseInitialized; | ||||
| 		 | ||||
| 		private static AdjustEventDriver _adjustEventDriver; | ||||
|  | @ -83,7 +83,6 @@ namespace Guru | |||
| 			FirebaseAnalytics.SetSessionTimeoutDuration(new TimeSpan(0, 30, 0)); | ||||
| 			 | ||||
| 			// --- 上报用户事件 --- | ||||
| 			SetUserProperty(FirebaseAnalytics.UserPropertySignUpMethod, "Google"); | ||||
| 			SetUserProperty(PropertyDeviceID, IPMConfig.IPM_DEVICE_ID); | ||||
| 			// SetUserProperty(PropertyFirstOpenTime, FirstOpenTime); | ||||
| 			 | ||||
|  | @ -228,8 +227,6 @@ namespace Guru | |||
| 				return; | ||||
| 			} | ||||
| 			 | ||||
| 			 | ||||
| 			 | ||||
| 			if (eventSetting == null) eventSetting = DefaultEventSetting; | ||||
| 
 | ||||
| 			var dataStr = ""; | ||||
|  |  | |||
|  | @ -78,6 +78,7 @@ namespace Guru | |||
| 				bool success = FirebaseUser != null; | ||||
| 				onLoginResult?.Invoke(success); | ||||
| 				_retryDelayTime = LOGIN_RETRY_INTERVAL; | ||||
| 				Analytics.SetUserProperty(Analytics.PropertySignUpMethod, "google"); // 上报用户登录属性 | ||||
| 			}); | ||||
| 		} | ||||
| 		 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue