/*private static void OnTrackPurchaseEvent(AnalyticsPurchaseInfo purchaseInfo) * { * var data = new Dictionary<string, object> { * {VoodooAnalyticsConstants.IAP_ID, purchaseInfo.productId}, * {VoodooAnalyticsConstants.PRICE, (float) purchaseInfo.localizedPrice}, * {VoodooAnalyticsConstants.CURRENCY, purchaseInfo.isoCurrencyCode}, * }; * VoodooAnalyticsManager.TrackEvent(EventName.iap, data); * }*/ //private static void OnTrackPurchaseVerificationEvent(PurchaseAnalyticsInfo purchaseInfo, bool validated) //{ // var data = new Dictionary<string, object> { // {VoodooAnalyticsConstants.IAP_ID, purchaseInfo.productId}, // {VoodooAnalyticsConstants.PRICE, (float) purchaseInfo.localizedPrice}, // {VoodooAnalyticsConstants.CURRENCY, purchaseInfo.isoCurrencyCode}, // {VoodooAnalyticsConstants.VALIDATED, validated} // }; // VoodooAnalyticsManager.TrackEvent(EventName.iap, data); //} private static void OnGameStarted(string level, Dictionary <string, object> eventProperties) { var data = new Dictionary <string, object> { { VoodooAnalyticsConstants.LEVEL, level }, { VoodooAnalyticsConstants.GAME_COUNT, AnalyticsStorageHelper.GetGameCount() }, { VoodooAnalyticsConstants.HIGHEST_SCORE, AnalyticsStorageHelper.GetGameHighestScore() } }; VoodooAnalyticsManager.TrackEvent(EventName.game_start, data, null, eventProperties); }
private static void OnGameFinished(bool levelComplete, float score, string level, Dictionary <string, object> eventProperties) { var data = new Dictionary <string, object> { { VoodooAnalyticsConstants.LEVEL, level }, { VoodooAnalyticsConstants.GAME_COUNT, AnalyticsStorageHelper.GetGameCount() }, { VoodooAnalyticsConstants.STATUS, levelComplete }, { VoodooAnalyticsConstants.SCORE, score } }; VoodooAnalyticsManager.TrackEvent(EventName.game_finish, data, null, eventProperties); }
internal static void TrackGameFinished(bool levelComplete, float score, string level, Dictionary <string, object> eventProperties) { HasGameStarted = false; AnalyticsStorageHelper.UpdateLevel(level); if (levelComplete) { // used to calculate the win rate (for RemoteConfig) AnalyticsStorageHelper.IncrementSuccessfulGameCount(); } OnGamePlayed?.Invoke(AnalyticsStorageHelper.GetGameCount(), AnalyticsStorageHelper.UpdateGameHighestScore(score)); OnGameFinishedEvent?.Invoke(levelComplete, score, level ?? NO_GAME_LEVEL, eventProperties); }