屏蔽上报
This commit is contained in:
parent
418d5780bf
commit
4fd0f4a6d0
@ -23,7 +23,8 @@ namespace AudienceNetwork
|
|||||||
public partial class AdManager : BF.MonoSingleton<AdManager>
|
public partial class AdManager : BF.MonoSingleton<AdManager>
|
||||||
{
|
{
|
||||||
private const string Tag = "AdManager:";
|
private const string Tag = "AdManager:";
|
||||||
private const string Key = "9uHgeBwag3NXva9MC23ToO3q11Ve59bF1uwg4qGltdGmCQ7OSByFZ_3b1ZF7krMlkHQo5gXzIokVDsvg1rwbr-";
|
// private const string Key = "9uHgeBwag3NXva9MC23ToO3q11Ve59bF1uwg4qGltdGmCQ7OSByFZ_3b1ZF7krMlkHQo5gXzIokVDsvg1rwbr-";
|
||||||
|
private const string Key = "9uHgeBwag3NXva9MC23ToO3q11Ve59bF1uwg4qGltdGmCQ7OSByFZ_3b1ZF7krMlkHQo5gXzIokVDsvg1rwbr-11";
|
||||||
string bannerAdUnitId = "YOUR_BANNER_AD_UNIT_ID"; // Retrieve the ID from your account
|
string bannerAdUnitId = "YOUR_BANNER_AD_UNIT_ID"; // Retrieve the ID from your account
|
||||||
string adInterstitialUnitId = "YOUR_AD_UNIT_ID";
|
string adInterstitialUnitId = "YOUR_AD_UNIT_ID";
|
||||||
string adRewardUnitId = "e54f27e345da90df";
|
string adRewardUnitId = "e54f27e345da90df";
|
||||||
|
|||||||
@ -21,147 +21,147 @@ namespace BF
|
|||||||
public void Init()
|
public void Init()
|
||||||
{
|
{
|
||||||
BFLog.Log("TASdk.Init");
|
BFLog.Log("TASdk.Init");
|
||||||
TASdk.Init();
|
// TASdk.Init();
|
||||||
AFSdk.Init();
|
// AFSdk.Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设置账户id
|
// 设置账户id
|
||||||
public void SetThinkingAnalyticsAccountId(string id)
|
public void SetThinkingAnalyticsAccountId(string id)
|
||||||
{
|
{
|
||||||
TASdk.SetAccountId(id);
|
// TASdk.SetAccountId(id);
|
||||||
AFSdk.SetTaAccountId(id);
|
// AFSdk.SetTaAccountId(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void InitAppsFlyerAdRevenue()
|
public void InitAppsFlyerAdRevenue()
|
||||||
{
|
{
|
||||||
if (isInitAFAdRevenue)
|
// if (isInitAFAdRevenue)
|
||||||
{
|
// {
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
isInitAFAdRevenue = true;
|
// isInitAFAdRevenue = true;
|
||||||
AppsFlyerAdRevenue.start();
|
// AppsFlyerAdRevenue.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 清除账户id
|
// 清除账户id
|
||||||
public void ClearThinkingAnalyticsAccountId()
|
public void ClearThinkingAnalyticsAccountId()
|
||||||
{
|
{
|
||||||
TASdk.ClearAccountId();
|
// TASdk.ClearAccountId();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 数数科技上报
|
// 数数科技上报
|
||||||
// lua端使用
|
// lua端使用
|
||||||
public void PostThinkingAnalyticsEvent(string eventName, string data = "")
|
public void PostThinkingAnalyticsEvent(string eventName, string data = "")
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(data))
|
// if (string.IsNullOrEmpty(data))
|
||||||
{
|
// {
|
||||||
TASdk.Track(eventName, null);
|
// TASdk.Track(eventName, null);
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
var properties = JsonConvert.DeserializeObject<Dictionary<string, object>>(data);
|
// var properties = JsonConvert.DeserializeObject<Dictionary<string, object>>(data);
|
||||||
TASdk.Track(eventName, properties);
|
// TASdk.Track(eventName, properties);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
// 数数科技上报
|
// 数数科技上报
|
||||||
// c#端使用,只上报事件名
|
// c#端使用,只上报事件名
|
||||||
public void PostThinkingAnalyticsEventName(string eventName)
|
public void PostThinkingAnalyticsEventName(string eventName)
|
||||||
{
|
{
|
||||||
TASdk.Track(eventName, null);
|
// TASdk.Track(eventName, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 数数科技上报
|
// 数数科技上报
|
||||||
// c#端使用,上报事件名和参数
|
// c#端使用,上报事件名和参数
|
||||||
public void PostThinkingAnalyticsEventProperties(string eventName, Dictionary<string, object> properties)
|
public void PostThinkingAnalyticsEventProperties(string eventName, Dictionary<string, object> properties)
|
||||||
{
|
{
|
||||||
TASdk.Track(eventName, properties);
|
// TASdk.Track(eventName, properties);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostAppsflyerEvent(string eventName, string data = "")
|
public void PostAppsflyerEvent(string eventName, string data = "")
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(data))
|
// if (string.IsNullOrEmpty(data))
|
||||||
{
|
// {
|
||||||
AFSdk.SendEvent(eventName, null);
|
// AFSdk.SendEvent(eventName, null);
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
var properties = JsonConvert.DeserializeObject<Dictionary<string, string>>(data);
|
// var properties = JsonConvert.DeserializeObject<Dictionary<string, string>>(data);
|
||||||
AFSdk.SendEvent(eventName, properties);
|
// AFSdk.SendEvent(eventName, properties);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostFireBaseEvent(string eventName, string data = "")
|
public void PostFireBaseEvent(string eventName, string data = "")
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(data))
|
// if (string.IsNullOrEmpty(data))
|
||||||
{
|
// {
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
BFMain.Instance.SDKMgr.BFNativeSDKMgr.LogEvent(eventName, data);
|
// BFMain.Instance.SDKMgr.BFNativeSDKMgr.LogEvent(eventName, data);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设置账户id
|
// 设置账户id
|
||||||
public void PostAdjustSimpleTrackEvent(string key)
|
public void PostAdjustSimpleTrackEvent(string key)
|
||||||
{
|
{
|
||||||
AdjustEvent adjustEvent = new AdjustEvent(key);
|
// AdjustEvent adjustEvent = new AdjustEvent(key);
|
||||||
// BFLog.Log("PostAdjustSimpleTrackEvent");
|
// // BFLog.Log("PostAdjustSimpleTrackEvent");
|
||||||
Adjust.trackEvent(adjustEvent);
|
// Adjust.trackEvent(adjustEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostAdjustRevenueTrackEvent(string key, double currency, string currencyCode)
|
public void PostAdjustRevenueTrackEvent(string key, double currency, string currencyCode)
|
||||||
{
|
{
|
||||||
AdjustEvent adjustEvent = new AdjustEvent(key);
|
// AdjustEvent adjustEvent = new AdjustEvent(key);
|
||||||
adjustEvent.setRevenue(currency, currencyCode);
|
// adjustEvent.setRevenue(currency, currencyCode);
|
||||||
// BFLog.Log("PostAdjustRevenueTrackEvent");
|
// // BFLog.Log("PostAdjustRevenueTrackEvent");
|
||||||
Adjust.trackEvent(adjustEvent);
|
// Adjust.trackEvent(adjustEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostAdjustCallbackTrackEvent(string key, string data = "")
|
public void PostAdjustCallbackTrackEvent(string key, string data = "")
|
||||||
{
|
{
|
||||||
var properties = JsonConvert.DeserializeObject<Dictionary<string, string>>(data);
|
// var properties = JsonConvert.DeserializeObject<Dictionary<string, string>>(data);
|
||||||
AdjustEvent adjustEvent = new AdjustEvent(key);
|
// AdjustEvent adjustEvent = new AdjustEvent(key);
|
||||||
foreach (var item in properties)
|
// foreach (var item in properties)
|
||||||
{
|
// {
|
||||||
adjustEvent.addCallbackParameter(item.Key, item.Value);
|
// adjustEvent.addCallbackParameter(item.Key, item.Value);
|
||||||
}
|
// }
|
||||||
// BFLog.Log("PostAdjustCallbackTrackEvent");
|
// // BFLog.Log("PostAdjustCallbackTrackEvent");
|
||||||
Adjust.trackEvent(adjustEvent);
|
// Adjust.trackEvent(adjustEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostAdjustPartnerTrackEvent(string key, string data = "")
|
public void PostAdjustPartnerTrackEvent(string key, string data = "")
|
||||||
{
|
{
|
||||||
var properties = JsonConvert.DeserializeObject<Dictionary<string, string>>(data);
|
// var properties = JsonConvert.DeserializeObject<Dictionary<string, string>>(data);
|
||||||
AdjustEvent adjustEvent = new AdjustEvent(key);
|
// AdjustEvent adjustEvent = new AdjustEvent(key);
|
||||||
foreach (var item in properties)
|
// foreach (var item in properties)
|
||||||
{
|
// {
|
||||||
adjustEvent.addPartnerParameter(item.Key, item.Value);
|
// adjustEvent.addPartnerParameter(item.Key, item.Value);
|
||||||
}
|
// }
|
||||||
// BFLog.Log("PostAdjustPartnerTrackEvent");
|
// // BFLog.Log("PostAdjustPartnerTrackEvent");
|
||||||
Adjust.trackEvent(adjustEvent);
|
// Adjust.trackEvent(adjustEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PostAdjustAdRevenueAppLovinMAX(double revenue, string networkName, string adUnitIdentifier, string placement)
|
public void PostAdjustAdRevenueAppLovinMAX(double revenue, string networkName, string adUnitIdentifier, string placement)
|
||||||
{
|
{
|
||||||
var adRevenue = new AdjustAdRevenue(AdjustConfig.AdjustAdRevenueSourceAppLovinMAX);
|
// var adRevenue = new AdjustAdRevenue(AdjustConfig.AdjustAdRevenueSourceAppLovinMAX);
|
||||||
adRevenue.setRevenue(revenue, "USD");
|
// adRevenue.setRevenue(revenue, "USD");
|
||||||
adRevenue.setAdRevenueNetwork(networkName);
|
// adRevenue.setAdRevenueNetwork(networkName);
|
||||||
adRevenue.setAdRevenueUnit(adUnitIdentifier);
|
// adRevenue.setAdRevenueUnit(adUnitIdentifier);
|
||||||
adRevenue.setAdRevenuePlacement(placement);
|
// adRevenue.setAdRevenuePlacement(placement);
|
||||||
Adjust.trackAdRevenue(adRevenue);
|
// Adjust.trackAdRevenue(adRevenue);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AdjustSetDeviceToken(string token)
|
public void AdjustSetDeviceToken(string token)
|
||||||
{
|
{
|
||||||
Adjust.setDeviceToken(token);
|
// Adjust.setDeviceToken(token);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LogAppsFlyerAdRevenue(int mediationNetwork, string monetizationNetwork, double eventRevenue, string data)
|
public void LogAppsFlyerAdRevenue(int mediationNetwork, string monetizationNetwork, double eventRevenue, string data)
|
||||||
{
|
{
|
||||||
var properties = JsonConvert.DeserializeObject<Dictionary<string, string>>(data);
|
// var properties = JsonConvert.DeserializeObject<Dictionary<string, string>>(data);
|
||||||
var mediationNetworkType = (AppsFlyerAdRevenueMediationNetworkType)mediationNetwork;
|
// var mediationNetworkType = (AppsFlyerAdRevenueMediationNetworkType)mediationNetwork;
|
||||||
AppsFlyerAdRevenue.logAdRevenue(monetizationNetwork, mediationNetworkType, eventRevenue, "USD", properties);
|
// AppsFlyerAdRevenue.logAdRevenue(monetizationNetwork, mediationNetworkType, eventRevenue, "USD", properties);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user