数数收益上报、firebase收益上报
This commit is contained in:
parent
3972dddb25
commit
522251e648
|
@ -48,10 +48,18 @@ public class FireBaseAnalyticsManager : NormalSingleton<FireBaseAnalyticsManager
|
||||||
Firebase.Analytics.FirebaseAnalytics.SetUserProperty(name, property);
|
Firebase.Analytics.FirebaseAnalytics.SetUserProperty(name, property);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// FireBase收益上报
|
/// FireBase收益上报
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void OnAdRevenueEvent(string ad_platform, string ad_source, string ad_unit_name, string ad_format, double revenue)
|
/// <param name="ad_platform">聚合平台名称</param>
|
||||||
|
/// <param name="ad_source">广告平台名称</param>
|
||||||
|
/// <param name="ad_unit_name">广告位ID</param>
|
||||||
|
/// <param name="ad_format">广告格式</param>
|
||||||
|
/// <param name="revenue">单次展示收益</param>
|
||||||
|
/// <param name="position">广告展示点位</param>
|
||||||
|
/// <param name="number">第几次展示该格式的广告</param>
|
||||||
|
private void OnAdRevenueEvent(string ad_platform, string ad_source, string ad_unit_name, string ad_format, double revenue, string position, int number)
|
||||||
{
|
{
|
||||||
var impressionParameters = new[] {
|
var impressionParameters = new[] {
|
||||||
new Firebase.Analytics.Parameter("ad_platform", ad_platform),
|
new Firebase.Analytics.Parameter("ad_platform", ad_platform),
|
||||||
|
@ -60,6 +68,8 @@ public class FireBaseAnalyticsManager : NormalSingleton<FireBaseAnalyticsManager
|
||||||
new Firebase.Analytics.Parameter("ad_format", ad_format),
|
new Firebase.Analytics.Parameter("ad_format", ad_format),
|
||||||
new Firebase.Analytics.Parameter("value", revenue),
|
new Firebase.Analytics.Parameter("value", revenue),
|
||||||
new Firebase.Analytics.Parameter("currency", "USD"), // All AppLovin revenue is sent in USD
|
new Firebase.Analytics.Parameter("currency", "USD"), // All AppLovin revenue is sent in USD
|
||||||
|
new Firebase.Analytics.Parameter("position", position),
|
||||||
|
new Firebase.Analytics.Parameter("number", number),
|
||||||
};
|
};
|
||||||
|
|
||||||
string name = GetName();
|
string name = GetName();
|
||||||
|
|
|
@ -36,4 +36,30 @@ public class ShuShuEvent : NormalSingleton<ShuShuEvent>
|
||||||
{
|
{
|
||||||
TDAnalytics.Track(eventName, properties);
|
TDAnalytics.Track(eventName, properties);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数数收益上报
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="ad_platform">聚合平台名称</param>
|
||||||
|
/// <param name="ad_source">广告平台名称</param>
|
||||||
|
/// <param name="ad_unit_name">广告位ID</param>
|
||||||
|
/// <param name="ad_format">广告格式</param>
|
||||||
|
/// <param name="revenue">单次展示收益</param>
|
||||||
|
/// <param name="position">广告展示点位</param>
|
||||||
|
/// <param name="number">第几次展示该格式的广告</param>
|
||||||
|
private void OnAdRevenueEvent(string ad_platform, string ad_source, string ad_unit_name, string ad_format, double revenue, string position, int number)
|
||||||
|
{
|
||||||
|
Dictionary<string, object> properties = new Dictionary<string, object>();
|
||||||
|
properties.Add("ad_platform", ad_platform);
|
||||||
|
properties.Add("ad_source", ad_source);
|
||||||
|
properties.Add("ad_unit_name", ad_unit_name);
|
||||||
|
properties.Add("ad_format", ad_format);
|
||||||
|
properties.Add("value", revenue);
|
||||||
|
properties.Add("currency", "USD");
|
||||||
|
properties.Add("position", position);
|
||||||
|
properties.Add("number", number);
|
||||||
|
|
||||||
|
TDAnalytics.Track("ad_impression", properties);
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue