diff --git a/Runtime/GuruAdjust/AdjustService.cs b/Runtime/GuruAdjust/AdjustService.cs index 9470da5..73965fe 100644 --- a/Runtime/GuruAdjust/AdjustService.cs +++ b/Runtime/GuruAdjust/AdjustService.cs @@ -280,7 +280,7 @@ namespace Guru private static void OnSessionSuccessCallback(AdjustSessionSuccess sessionSuccessData) { - LogI(LOG_TAG,"Session tracked successfully!"); + LogI(LOG_TAG,$"{LOG_TAG} --- Session tracked successfully!"); var adid = sessionSuccessData.Adid; _onSessionSuccessCallback?.Invoke(adid); diff --git a/Runtime/GuruCore/Runtime/Firebase/FirebaseUtil.cs b/Runtime/GuruCore/Runtime/Firebase/FirebaseUtil.cs index 55a993e..d5d4c47 100644 --- a/Runtime/GuruCore/Runtime/Firebase/FirebaseUtil.cs +++ b/Runtime/GuruCore/Runtime/Firebase/FirebaseUtil.cs @@ -117,21 +117,37 @@ namespace Guru // 启动 AdjustService string appToken = GuruSettings.Instance.AdjustSetting?.GetAppToken() ?? ""; string fbAppId = GuruSettings.Instance.IPMSetting.FacebookAppId; - AdjustService.StartService(appToken, fbAppId, adid => + + if (!string.IsNullOrEmpty(IPMConfig.ADJUST_ID)) + { + ReportAdjustId(IPMConfig.ADJUST_ID); // 二次启动后,若有值则立即上报属性 + } + + AdjustService.StartService(appToken, fbAppId, adjustId => { // 获取 ADID - if (string.IsNullOrEmpty(adid)) + if (string.IsNullOrEmpty(adjustId)) { - adid = "not_set"; + adjustId = "not_set"; } - FirebaseAnalytics.SetUserProperty("adjust_id", adid); // 仅上报 Firebase 用户属性 - Debug.Log($"[SDK] --- Firebase + Adjust ID: {adid}"); + else + { + IPMConfig.ADJUST_ID = adjustId; + } + ReportAdjustId(adjustId); }); }); } + private static void ReportAdjustId(string adjustId) + { + FirebaseAnalytics.SetUserProperty("adjust_id", adjustId); // 仅上报 Firebase 用户属性 + Debug.Log($"[SDK] --- Firebase + Adjust ID: {adjustId}"); + } + + #endregion