AdMob SDK integration

Important:
In order to enable this feature, please reach out to your Google point of contact. Your point of contact will be able to activate the feature for you to access it.
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 use this feature, you first need to download and set up the Adjust SDK for your platform. Follow the instructions linked below to get started.

⚙️ iOS SDK v4.29.2 and later / Android SDK v4.28.0 and later / Unity SDK v4.29.0 and later

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];
      }
    }
  ];
}