Exemplo n.º 1
0
        /**
         * 实现在应用程序中埋点来统计用户的点击行为
         */
        void logEvent()
        {
            Dictionary <string, string> dic = new Dictionary <string, string>();

            dic["100"]  = "Page1 open";
            dic["角色名称"] = "yonghu";
            dic["登陆时间"] = "2014";
            AnySDKAnalytics.getInstance().logEvent("10", dic);
        }
Exemplo n.º 2
0
        void failTask()
        {
            Dictionary <string, string> paramMap = new Dictionary <string, string>();

            paramMap["Task_Id"]     = "123456";
            paramMap["Fail_Reason"] = "test";
            AnySDKParam param = new AnySDKParam(paramMap);

            AnySDKAnalytics.getInstance().callFuncWithParam("failTask", param);
        }
Exemplo n.º 3
0
        void startTask()
        {
            Dictionary <string, string> paramMap = new Dictionary <string, string>();

            paramMap["Task_Id"]   = "123456";
            paramMap["Task_Type"] = Convert.ToString((int)TaskType.GUIDE_LINE);
            AnySDKParam param = new AnySDKParam(paramMap);

            AnySDKAnalytics.getInstance().callFuncWithParam("startTask", param);
        }
Exemplo n.º 4
0
        private void failTask()
        {
            Dictionary <string, string> dictionary = new Dictionary <string, string>();

            dictionary["Task_Id"]     = "123456";
            dictionary["Fail_Reason"] = "test";
            AnySDKParam param = new AnySDKParam(dictionary);

            AnySDKAnalytics.getInstance().callFuncWithParam("failTask", param);
        }
Exemplo n.º 5
0
        void onChargeFail()
        {
            Dictionary <string, string> paramMap = new Dictionary <string, string>();

            paramMap["Order_Id"]    = "123456";
            paramMap["Fail_Reason"] = "test";
            AnySDKParam param = new AnySDKParam(paramMap);

            AnySDKAnalytics.getInstance().callFuncWithParam("onChargeFail", param);
        }
Exemplo n.º 6
0
        private void startLevel()
        {
            Dictionary <string, string> dictionary = new Dictionary <string, string>();

            dictionary["Level_Id"] = "123456";
            dictionary["Seq_Num"]  = "1";
            AnySDKParam param = new AnySDKParam(dictionary);

            AnySDKAnalytics.getInstance().callFuncWithParam("startLevel", param);
        }
Exemplo n.º 7
0
        private void startTask()
        {
            Dictionary <string, string> dictionary = new Dictionary <string, string>();

            dictionary["Task_Id"]   = "123456";
            dictionary["Task_Type"] = Convert.ToString(0);
            AnySDKParam param = new AnySDKParam(dictionary);

            AnySDKAnalytics.getInstance().callFuncWithParam("startTask", param);
        }
Exemplo n.º 8
0
        void startLevel()
        {
            Dictionary <string, string> paramMap = new Dictionary <string, string>();

            paramMap["Level_Id"] = "123456";
            paramMap["Seq_Num"]  = "1";
            AnySDKParam param = new AnySDKParam(paramMap);

            AnySDKAnalytics.getInstance().callFuncWithParam("startLevel", param);
        }
Exemplo n.º 9
0
        void OnGUI()
        {
            GUI.color = Color.white;

            GUI.skin.button.fontSize = 30;
            if (GUI.Button(new Rect(5, 5, Screen.width - 10, 70), "startSession"))
            {
                AnySDKAnalytics.getInstance().setDebugMode(true);
                startSession();
            }

            if (GUI.Button(new Rect(5, 80, Screen.width - 10, 70), "stopSession"))
            {
                stopSession();
            }

            if (GUI.Button(new Rect(5, 155, Screen.width - 10, 70), "setSessionContinueMillis"))
            {
                setSessionContinueMillis();
            }

            if (GUI.Button(new Rect(5, 230, Screen.width - 10, 70), "logError"))
            {
                logError();
            }


            if (GUI.Button(new Rect(5, 305, Screen.width - 10, 70), "logEvent"))
            {
                logEvent();
            }


            if (GUI.Button(new Rect(5, 380, Screen.width - 10, 70), "logTimedEventBegin"))
            {
                logTimedEventBegin();
            }


            if (GUI.Button(new Rect(5, 455, Screen.width - 10, 70), "logTimedEventEnd"))
            {
                logTimedEventEnd();
            }

            if (GUI.Button(new Rect(5, 530, Screen.width - 10, 70), "setCaptureUncaughtException"))
            {
                setCaptureUncaughtException( );
            }

            if (GUI.Button(new Rect(5, 605, Screen.width - 10, 70), "return"))
            {
                Destroy(GetComponent("TestAnalyticsPlugin"));
                this.gameObject.AddComponent("Test");
            }
        }
Exemplo n.º 10
0
        void onReward()
        {
            Dictionary <string, string> paramMap = new Dictionary <string, string>();

            paramMap["Item_Id"]    = "123456";
            paramMap["Item_Type"]  = "test";
            paramMap["Item_Count"] = Convert.ToString(2);
            paramMap["Use_Reason"] = "1";
            AnySDKParam param = new AnySDKParam(paramMap);

            AnySDKAnalytics.getInstance().callFuncWithParam("onReward", param);
        }
Exemplo n.º 11
0
        private void onUse()
        {
            Dictionary <string, string> dictionary = new Dictionary <string, string>();

            dictionary["Item_Id"]    = "123456";
            dictionary["Item_Type"]  = "test";
            dictionary["Item_Count"] = Convert.ToString(2);
            dictionary["Use_Reason"] = "1";
            AnySDKParam param = new AnySDKParam(dictionary);

            AnySDKAnalytics.getInstance().callFuncWithParam("onUse", param);
        }
Exemplo n.º 12
0
        void onPurchase()
        {
            Dictionary <string, string> paramMap = new Dictionary <string, string>();

            paramMap["Item_Id"]          = "123456";
            paramMap["Item_Type"]        = "test";
            paramMap["Item_Count"]       = Convert.ToString(2);
            paramMap["Virtual_Currency"] = "1";
            paramMap["Currency_Type"]    = AnySDK.getInstance().getChannelId();
            AnySDKParam param = new AnySDKParam(paramMap);

            AnySDKAnalytics.getInstance().callFuncWithParam("onPurchase", param);
        }
Exemplo n.º 13
0
        void onChargeOnlySuccess()
        {
            Dictionary <string, string> paramMap = new Dictionary <string, string>();

            paramMap["Order_Id"]                = "123456";
            paramMap["Product_Name"]            = "test";
            paramMap["Currency_Amount"]         = Convert.ToString(2.0);
            paramMap["Currency_Type"]           = "1";
            paramMap["Payment_Type"]            = "1";
            paramMap["Virtual_Currency_Amount"] = Convert.ToString(100);
            AnySDKParam param = new AnySDKParam(paramMap);

            AnySDKAnalytics.getInstance().callFuncWithParam("onChargeOnlySuccess", param);
        }
Exemplo n.º 14
0
        private void onChargeRequest()
        {
            Dictionary <string, string> dictionary = new Dictionary <string, string>();

            dictionary["Order_Id"]                = "123456";
            dictionary["Product_Name"]            = "test";
            dictionary["Currency_Amount"]         = Convert.ToString(2.0);
            dictionary["Currency_Type"]           = "1";
            dictionary["Payment_Type"]            = "1";
            dictionary["Virtual_Currency_Amount"] = Convert.ToString(100);
            AnySDKParam param = new AnySDKParam(dictionary);

            AnySDKAnalytics.getInstance().callFuncWithParam("onChargeRequest", param);
        }
Exemplo n.º 15
0
        void setAccount()
        {
            Dictionary <string, string> paramMap = new Dictionary <string, string>();

            paramMap["Account_Id"]      = "123";
            paramMap["Account_Name"]    = "test";
            paramMap["Account_Type"]    = Convert.ToString((int)AccountType.ANONYMOUS);
            paramMap["Account_Level"]   = "1";
            paramMap["Account_Age"]     = "1";
            paramMap["Account_Operate"] = Convert.ToString((int)AccountOperate.LOGIN);
            paramMap["Account_Gender"]  = Convert.ToString((int)AccountGender.MALE);
            paramMap["Server_Id"]       = "1";
            AnySDKParam param = new AnySDKParam(paramMap);

            AnySDKAnalytics.getInstance().callFuncWithParam("setAccount", param);
        }
Exemplo n.º 16
0
        private void setAccount()
        {
            Dictionary <string, string> dictionary = new Dictionary <string, string>();

            dictionary["Account_Id"]      = "123";
            dictionary["Account_Name"]    = "test";
            dictionary["Account_Type"]    = Convert.ToString(0);
            dictionary["Account_Level"]   = "1";
            dictionary["Account_Age"]     = "1";
            dictionary["Account_Operate"] = Convert.ToString(0);
            dictionary["Account_Gender"]  = Convert.ToString(0);
            dictionary["Server_Id"]       = "1";
            AnySDKParam param = new AnySDKParam(dictionary);

            AnySDKAnalytics.getInstance().callFuncWithParam("setAccount", param);
        }
Exemplo n.º 17
0
 private void OnGUI()
 {
     GUI.color = Color.white;
     GUI.skin.button.fontSize = 30;
     if (GUI.Button(new Rect(5f, 5f, (float)(Screen.width - 10), 70f), "startSession"))
     {
         AnySDKAnalytics.getInstance().setDebugMode(true);
         this.startSession();
     }
     if (GUI.Button(new Rect(5f, 80f, (float)(Screen.width - 10), 70f), "stopSession"))
     {
         this.stopSession();
     }
     if (GUI.Button(new Rect(5f, 155f, (float)(Screen.width - 10), 70f), "setSessionContinueMillis"))
     {
         this.setSessionContinueMillis();
     }
     if (GUI.Button(new Rect(5f, 230f, (float)(Screen.width - 10), 70f), "logError"))
     {
         this.logError();
     }
     if (GUI.Button(new Rect(5f, 305f, (float)(Screen.width - 10), 70f), "logEvent"))
     {
         this.logEvent();
     }
     if (GUI.Button(new Rect(5f, 380f, (float)(Screen.width - 10), 70f), "logTimedEventBegin"))
     {
         this.logTimedEventBegin();
     }
     if (GUI.Button(new Rect(5f, 455f, (float)(Screen.width - 10), 70f), "logTimedEventEnd"))
     {
         this.logTimedEventEnd();
     }
     if (GUI.Button(new Rect(5f, 530f, (float)(Screen.width - 10), 70f), "setCaptureUncaughtException"))
     {
         this.setCaptureUncaughtException();
     }
     if (GUI.Button(new Rect(5f, 605f, (float)(Screen.width - 10), 70f), "return"))
     {
         UnityEngine.Object.Destroy(base.GetComponent("TestAnalyticsPlugin"));
         base.gameObject.AddComponent("Test");
     }
 }
Exemplo n.º 18
0
 /**
  * 当用户两次使用之间过长时,将被认为是两个的独立的session(启动)
  */
 void setSessionContinueMillis()
 {
     AnySDKAnalytics.getInstance().setSessionContinueMillis(2000L);
 }
Exemplo n.º 19
0
 private void finishLevel()
 {
     AnySDKAnalytics.getInstance().callFuncWithParam("finishLevel", new AnySDKParam("123456"));
 }
Exemplo n.º 20
0
 private void startSession()
 {
     AnySDKAnalytics.getInstance().startSession();
 }
Exemplo n.º 21
0
 void onChargeSuccess()
 {
     AnySDKAnalytics.getInstance().callFuncWithParam("onChargeSuccess", new AnySDKParam("123456"));
 }
Exemplo n.º 22
0
 /**
  * 实现在应用程序中埋点来统计用户的错误信息
  */
 void logError()
 {
     AnySDKAnalytics.getInstance().logError("100", "test test test");
 }
Exemplo n.º 23
0
 /**
  * 记录事件的结束时间
  */
 void logTimedEventEnd()
 {
     AnySDKAnalytics.getInstance().logTimedEventEnd("10");
 }
Exemplo n.º 24
0
 void finishTask()
 {
     AnySDKAnalytics.getInstance().callFuncWithParam("finishTask", new AnySDKParam("123456"));
 }
Exemplo n.º 25
0
 /**
  * 收集应用错误日志
  */
 void setCaptureUncaughtException()
 {
     AnySDKAnalytics.getInstance().setCaptureUncaughtException(true);
 }
Exemplo n.º 26
0
 /**
  * 用于跟踪用户离开页面和退出应用的数据
  */
 void stopSession()
 {
     AnySDKAnalytics.getInstance().stopSession();
 }
Exemplo n.º 27
0
 /**
  * 记录事件的开始时间
  */
 void logTimedEventBegin()
 {
     AnySDKAnalytics.getInstance().logTimedEventBegin("10");
 }