AdMob SDK integration

Note:

If you have any questions about ad revenue tracking with AdMob, please contact your dedicated account manager or send an email to support@adjust.com.

If you want to track your ad revenue with the AdMob SDK, you can use our SDK-to-SDK integration to pass this information to the Adjust backend.

Before you begin

To get started with the AdMob SDK integration, follow these steps:

  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.

Examples

Objective-CiOS
JavaAndroid
C#Unity
- (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:ADJAdRevenueSourceAdMob];
          [adRevenue setRevenue:value.value currency:value.currencyCode];
          [adRevenue setAdRevenueNetwork:loadedAdNetworkResponseInfo.adSourceName]
          [Adjust trackAdRevenue:adRevenue];
      }
    }
  ];
}