Пример #1
0
 private void OnTriggerEnter2D(Collider2D collider)
 {
     if (collider.GetComponent <PlayerControl>() != null)
     {
         townNumber = townNumber + 1;
         GameControl.instance.hitNewTown();
         ReportTownReach(townNumber);
         AnalyticsResult ar = Analytics.CustomEvent("town_reach");
         Debug.Log("Result = " + ar.ToString());
     }
 }
Пример #2
0
    // Click procs

    public void callNumber(string Number)
    {
        if (menuMover.IsCancelNextMenu())
        {
            return;
        }
                #if !UNITY_EDITOR
        AnalyticsResult res = Analytics.CustomEvent("userCall", new Dictionary <string, object> {
            { "callOrg", menuSets[currSubMenuSetIndex].Title.text }
        });
        Debug.Log("Event: userCall: " + res.ToString());
        Application.OpenURL("tel:" + Number);
                #endif
    }
Пример #3
0
    public void WhenRestarted(string title)
    {
        if (SessionManager.Consent)
        {
            Dictionary <string, object> restartInfo = new Dictionary <string, object>();
            restartInfo.Add("SessionID", SessionManager.SessionId);
            restartInfo.Add("DuringGameTitle", title);


            AnalyticsResult ar = Analytics.CustomEvent("RESTART_INFO", restartInfo);

            Debug.Log("Result = " + ar.ToString());
        }
    }
Пример #4
0
    public void HelpScreenOpened(string title, int howManyTimesHelpOpened)
    {
        if (SessionManager.Consent)
        {
            Dictionary <string, object> helpScreen = new Dictionary <string, object>();
            helpScreen.Add("SessionID", SessionManager.SessionId);
            helpScreen.Add("GameTitle", title);
            helpScreen.Add("AmountHelpOpened", howManyTimesHelpOpened);


            AnalyticsResult ar = Analytics.CustomEvent("HELP_OPENED", helpScreen);

            Debug.Log("Result = " + ar.ToString());
        }
    }
Пример #5
0
    public void SendFinishedLevelInfo(string title, int correctAmount, int incorrectAmount)
    {
        if (SessionManager.Consent)
        {
            Dictionary <string, object> levelData = new Dictionary <string, object>();
            levelData.Add("SessionID", SessionManager.SessionId);
            levelData.Add("GameTitle", title);
            levelData.Add("CorrectAnswers", correctAmount);
            levelData.Add("IncorrectAnswers", incorrectAmount);


            AnalyticsResult ar = Analytics.CustomEvent("LEVEL_FINISHED", levelData);

            Debug.Log("Result = " + ar.ToString());
        }
    }
Пример #6
0
    public void DidYouKnowAnalytics(string answer)
    {
        if (SessionManager.Consent)
        {
            Dictionary <string, object> didYouKnowInfo = new Dictionary <string, object>();
            didYouKnowInfo.Add("SessionID", SessionManager.SessionId);
            didYouKnowInfo.Add("CurrentDidYouKnowScene", SceneManager.GetActiveScene().name);
            didYouKnowInfo.Add("Answer", answer);
            didYouKnowInfo.Add("TimeSpentOnThePage", Time.timeSinceLevelLoad);

            // Custom Data Collection
            DataCollectionFileManager.WriteStringContinuation(answer, true);
            DataCollectionFileManager.WriteStringContinuation(Time.timeSinceLevelLoad.ToString(), true);

            AnalyticsResult ar = Analytics.CustomEvent("DYK_INFO", didYouKnowInfo);

            Debug.Log("Result = " + ar.ToString());
        }
    }
Пример #7
0
        public void SendCustomUnityAnalytic(string i_eventName, IDictionary <string, object> i_eventData)
        {
            AnalyticsResult result = mAnalytics.SendCustomEvent(i_eventName, i_eventData);

            if (result != AnalyticsResult.Ok)
            {
                string log = "Failed to send analytic " + i_eventName + " with reason: " + result.ToString();
                EasyLogger.Instance.Log(LogTypes.Warn, log, LOG_TYPE);
            }
        }
Пример #8
0
    /// <summary>
    /// Call to check if analytics are firering correctly
    /// </summary>
    public static void TestAnalyitc()
    {
        AnalyticsResult ar = Analytics.CustomEvent("MyEvent");

        Debug.Log("Result = " + ar.ToString());
    }