adjust-icon

Admob SDK integration

If you want to measure ad revenue with the AdMob SDK, you can use the SDK-to-SDK integration to pass this information to Adjust’s servers.

Before you begin

  1. Configure the Adjust SDK and integrate it in your app.
  2. Configure impression-level ad revenue (ILAR) in Admob. See Google’s documentation for instructions.

Example

- (void)requestRewardedAd {
__weak ViewController *weakSelf = self;
GADRequest *request = [GADRequest request];
[GADRewardedAd
loadWithAdUnitID:@"ad unit ID"
request:request
completionHandler:^(GADRewardedAd *ad, NSError *error) {
self.rewardedAd = ad;
self.rewardedAd.paidEventHandler = ^void(GADAdValue *_Nonnull value) {
ViewController *strongSelf = weakSelf;
// for more information, please check AdMob official docs at:
// https://developers.google.com/admob/ios/impression-level-ad-revenue
GADAdNetworkResponseInfo *loadedAdNetworkResponseInfo = strongSelf.rewardedAd.responseInfo.loadedAdNetworkResponseInfo;
// send ad revenue info to Adjust
ADJAdRevenue *adRevenue = [[ADJAdRevenue alloc]
initWithSource:@"admob_sdk"];
[adRevenue setRevenue:value.value currency:value.currencyCode];
[adRevenue setAdRevenueNetwork:loadedAdNetworkResponseInfo.adSourceName]
[Adjust trackAdRevenue:adRevenue];
}
}
];
}