public void logOutUser() { saveUserGameData(); analytics.LogEvent(new EventHitBuilder().SetEventCategory("Log out").SetEventAction("User logging out")); analytics.StopSession(); user = null; userID = -1; analytics.LogEvent(new EventHitBuilder().SetEventCategory("Log out").SetEventAction("User has logged out")); analytics.DispatchHits(); }
void Start() { ga.dispatchPeriod = 30; ga.DispatchHits(); ga.StartSession(); }
// Update is called once per frame void Update() { dTime += Time.unscaledDeltaTime; if (dTime >= dispathcAfterEvery) { dTime = 0f; #if GOOGLE_ANALYTICS googleAnalytics.DispatchHits(); #endif } }