public void SetParams(string adsId, int adsLimited) { this.isTablet = ScreenUtils.CanFitTabletBanner(); this.config = this.LoadDefaultConfig(); this.adsUrlQueue = this.PrepareAdsUrlQueue(adsId, adsLimited); this.rewardInfo = RewardEventData.LoadEventData(); }
public static void RewardRequest(RewardEventData r) { AnalyticsManager.Log("ad_rewarded_request", new Dictionary <string, string> { { AnalyticsManager.countDayKey, r.ReqDay.ToString() }, { AnalyticsManager.countSessionKey, r.ReqSession.ToString() } }, true); }
public static RewardEventData LoadEventData() { string jsonStr = RewardEventData.JsonStr; RewardEventData rewardEventData; if (!string.IsNullOrEmpty(jsonStr)) { rewardEventData = JsonUtility.FromJson <RewardEventData>(jsonStr); if (rewardEventData != null && rewardEventData.date == RewardEventData.GetCurrentDate()) { return(rewardEventData); } } rewardEventData = new RewardEventData(RewardEventData.GetCurrentDate()); rewardEventData.SaveEventData(); return(rewardEventData); }
public static void RewardLoaded(RewardEventData r) { AnalyticsManager.Log("ad_rewarded_loaded", new Dictionary <string, string> { { AnalyticsManager.countDayKey, r.LoadedDay.ToString() }, { AnalyticsManager.countSessionKey, r.LoadedSession.ToString() }, { "time", r.LoadTime.ToString() } }, false); }
public static void RewardImpression(string adUnit, RewardEventData r) { AnalyticsManager.Log("ad_rewarded_impression", new Dictionary <string, string> { { AnalyticsManager.adUnitKey, adUnit }, { AnalyticsManager.countDayKey, r.ImpDay.ToString() }, { AnalyticsManager.countSessionKey, r.ImpSession.ToString() }, { "place", r.place.ToString().ToLower() } }, false); }