From 1cc976d33bfbe7488c85df9d35f28aa6e4360294 Mon Sep 17 00:00:00 2001 From: wangguan <wangguan@kt007.com> Date: Tue, 27 Oct 2020 20:38:46 +0800 Subject: [PATCH] 埋点 --- Assets/Scripts/GameAnalytics_SDK/UI/LoginUI.cs | 39 ++++++++++++++++++++++++++++----------- 1 files changed, 28 insertions(+), 11 deletions(-) diff --git a/Assets/Scripts/GameAnalytics_SDK/UI/LoginUI.cs b/Assets/Scripts/GameAnalytics_SDK/UI/LoginUI.cs index 038712f..5a0c4af 100644 --- a/Assets/Scripts/GameAnalytics_SDK/UI/LoginUI.cs +++ b/Assets/Scripts/GameAnalytics_SDK/UI/LoginUI.cs @@ -19,20 +19,22 @@ void Start() { GA_SDK_Manager.Ins.SDKInit(ChannelID.Gm.ToString()); + GA_SDK_Manager.Ins.Statistics(1);//成功加载登陆界面的人数 isLogining = false; transform.Find("Panel/Button").GetComponent<Button>().onClick.AddListener(OnClickLoginBtn); - // if (Application.platform == RuntimePlatform.Android) - // { - // GetetDeviceIMEI();//获取安卓手机IMEI - // } - // else if (Application.platform == RuntimePlatform.WindowsEditor) - // { - // imei0 = "MyTestGemBattle1"; - // } + if (Application.platform == RuntimePlatform.Android) + { + //GetetDeviceIMEI();//获取安卓手机IMEI + imei0 = GA_SDK_Manager.Ins.GetDeviceId();//使用设备ID + } + else if (Application.platform == RuntimePlatform.WindowsEditor) + { + imei0 = "MyTestGemBattle123"; + } - imei0 = GA_SDK_Manager.Ins. GetDeviceId();//使用设备ID + } @@ -69,8 +71,8 @@ private void OnClickLoginBtn() { - Debug.Log("登录"); LoginRequest(); + GA_SDK_Manager.Ins.Statistics(2);//埋点 } @@ -82,6 +84,19 @@ { if (!isLogining) { + Debug.Log("登录"); + if (Application.platform == RuntimePlatform.WindowsEditor) + { + Debug.Log("编辑器直接登录"); + + GA_SDK_Manager.Ins.Login(imei0); + GA_SDK_Manager.Ins.Statistics(3);//埋点 + + //StartCoroutine(loginMy()); + StartCoroutine(LoadScene()); + return; + } + isLogining = true; string url = GameConfig.IsDebug ? GameConfig.TestLoginUrl : GameConfig.LoginUrl; JsonData data = new JsonData(); @@ -163,9 +178,11 @@ if (login.Errorcode == 0) { Debug.Log("--------------------- 登录成功 ---------------------"); - UserDataMsg userData = login.Userdata; + //UserDataMsg userData = login.Userdata; GA_SDK_Manager.Ins.Login(imei0); + GA_SDK_Manager.Ins.Statistics(3);//埋点 + //StartCoroutine(loginMy()); StartCoroutine(LoadScene()); -- Gitblit v1.9.1