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()); } }
// 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 }
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()); } }
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()); } }
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()); } }
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()); } }
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); } }
/// <summary> /// Call to check if analytics are firering correctly /// </summary> public static void TestAnalyitc() { AnalyticsResult ar = Analytics.CustomEvent("MyEvent"); Debug.Log("Result = " + ar.ToString()); }