Retrieving Information about the Ad Response

For debugging and logging purposes, successfully loaded ads provide a GADResponseInfo object. This object contains information about the ad it loaded. Each ad format class has a property to get the response info. On interstitial ads for example, use the responseInfo property.

Response info properties

Properties of the GADResponseInfo object include:

A unique identifier of the ad response. This can be used to identify and block the ad in the Ads Review Center (ARC).
The class name of the ad network that fetched the current ad. Values that can be returned from this property include:

Ad Source Class name
Google Ads Value of GADGoogleAdNetworkClassName
Rewarded Custom events Your custom event's class name
All other custom events Value of GADCustomEventAdNetworkClassName
Mediation The mediation adapter's class name

Sample code

Here is a sample snippet from a GADBannerViewDelegate callback implementation:


func adViewDidReceiveAd(_ bannerView: GADBannerView) {
  print("adViewDidReceiveAd from network: \(bannerView.responseInfo?.adNetworkClassName)")


- (void)adViewDidReceiveAd:(GADBannerView *)adView {
  NSLog(@"adViewDidReceiveAd from network: %@", adView.responseInfo.adNetworkClassName);