public AnalyticsManager.AdData OnAdRevenuePaidEvent(string adUnitId, MaxSdkBase.AdInfo adInfo) { AnalyticsManager.AdData adData = new AnalyticsManager.AdData(); adData.revenue = (float)adInfo.Revenue; adData.country_code = MaxSdk.GetSdkConfiguration().CountryCode; adData.network_name = adInfo.NetworkName; adData.network_placement = adInfo.NetworkPlacement; adData.placement = adInfo.Placement; adData.ad_unit_id = adInfo.AdUnitIdentifier; adData.creative_id = adInfo.CreativeIdentifier; return(adData); }
private static void runCallback(string format, MaxSdkBase.AdInfo adInfo, Action <string> callback) { Dictionary <string, object> dict = new Dictionary <string, object>(); dict.Add("country", MaxSdk.GetSdkConfiguration().CountryCode); dict.Add("network_name", adInfo.NetworkName); dict.Add("adunit_id", adInfo.AdUnitIdentifier); dict.Add("adunit_format", format); dict.Add("placement", adInfo.Placement); dict.Add("creative_id", adInfo.CreativeIdentifier); dict.Add("revenue", adInfo.Revenue); string json = GA_MiniJSON.Serialize(dict); callback(json); }