adjust-icon

AdMob SDK 集成

如果您想使用 AdMob SDK 监测广告收入,可以借助 SDK 到 SDK 集成,将数据发送到 Adjust 服务器。

操作前须知

  1. 配置 Adjust SDK 并将其集成至您的应用
  2. 在 AdMob 中配置展示层级广告收入 (ILAR)。请参考 Google 的说明文档

示例

this.rewardedAd.OnPaidEvent += this.HandleAdPaidEvent;
public void HandleAdPaidEvent(object sender, AdValueEventArgs args)
{
// for more information, please check AdMob official docs at:
// https://developers.google.com/admob/unity/impression-level-ad-revenue
AdValue adValue = args.AdValue;
AdapterResponseInfo loadedAdapterResponseInfo = rewardedAd.GetResponseInfo().GetLoadedAdapterResponseInfo();
// send ad revenue info to Adjust
AdjustAdRevenue adRevenue = new AdjustAdRevenue("admob_sdk");
adRevenue.SetRevenue(adValue.Value / 1000000f, adValue.CurrencyCode);
adRevenue.AdRevenueNetwork = loadedAdapterResponseInfo.AdSourceName;
Adjust.TrackAdRevenue(adRevenue);
}