GoogleMobileAds Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
-
Indicates whether the ad handles user clicks. If this method returns YES, the ad must handle
user clicks and notify the Google Mobile Ads SDK of clicks using
-[GADMediationAdEventDelegate reportClick:]. If this method returns NO, the Google Mobile Ads
SDK handles user clicks and notifies the ad of clicks using -[GADMediationNativeAd
didRecordClickOnAssetWithName:view:viewController:].
Declaration
Swift
optional func handlesUserClicks() -> Bool
Objective-C
- (BOOL)handlesUserClicks;
-
Indicates whether the ad handles user impressions tracking. If this method returns YES, the
Google Mobile Ads SDK will not track user impressions and the ad must notify the
Google Mobile Ads SDK of impressions using -[GADMediationAdEventDelegate
reportImpression:]. If this method returns NO, the Google Mobile Ads SDK tracks user impressions
and notifies the ad of impressions using -[GADMediationNativeAd didRecordImpression:].
Declaration
Swift
optional func handlesUserImpressions() -> Bool
Objective-C
- (BOOL)handlesUserImpressions;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[null,null,["Last updated 2025-08-20 UTC."],[[["\u003cp\u003e\u003ccode\u003eGADMediationNativeAd\u003c/code\u003e protocol represents a rendered native ad within the Google Mobile Ads Mediation framework.\u003c/p\u003e\n"],["\u003cp\u003ePublishers can choose whether the mediated ad or the SDK handles user clicks by implementing \u003ccode\u003ehandlesUserClicks\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eSimilarly, \u003ccode\u003ehandlesUserImpressions\u003c/code\u003e allows publishers to control whether the mediated ad or the SDK handles impression tracking.\u003c/p\u003e\n"],["\u003cp\u003eIf the mediated ad handles clicks or impressions, it must notify the SDK using the appropriate \u003ccode\u003eGADMediationAdEventDelegate\u003c/code\u003e methods.\u003c/p\u003e\n"],["\u003cp\u003eIf the SDK handles clicks or impressions, it will notify the mediated ad using \u003ccode\u003edidRecordClickOnAssetWithName:view:viewController:\u003c/code\u003e or \u003ccode\u003edidRecordImpression:\u003c/code\u003e respectively.\u003c/p\u003e\n"]]],[],null,["# GoogleMobileAds Framework Reference\n\nGADMediationNativeAd\n====================\n\n @protocol GADMediationNativeAd \u003c../Protocols.html#/c:objc(pl)GADMediationAd, ../Protocols/GADMediatedUnifiedNativeAd.html\u003e\n\nRendered native ad.\n- `\n ``\n ``\n `\n\n ### [-handlesUserClicks](#/c:objc(pl)GADMediationNativeAd(im)handlesUserClicks)\n\n `\n ` \n Indicates whether the ad handles user clicks. If this method returns YES, the ad must handle\n user clicks and notify the Google Mobile Ads SDK of clicks using\n -\\[GADMediationAdEventDelegate reportClick:\\]. If this method returns NO, the Google Mobile Ads\n SDK handles user clicks and notifies the ad of clicks using -\\[GADMediationNativeAd\n didRecordClickOnAssetWithName:view:viewController:\\]. \n\n #### Declaration\n\n Swift \n\n optional func handlesUserClicks() -\u003e Bool\n\n Objective-C \n\n - (BOOL)handlesUserClicks;\n\n- `\n ``\n ``\n `\n\n ### [-handlesUserImpressions](#/c:objc(pl)GADMediationNativeAd(im)handlesUserImpressions)\n\n `\n ` \n Indicates whether the ad handles user impressions tracking. If this method returns YES, the\n Google Mobile Ads SDK will not track user impressions and the ad must notify the\n Google Mobile Ads SDK of impressions using -\\[GADMediationAdEventDelegate\n reportImpression:\\]. If this method returns NO, the Google Mobile Ads SDK tracks user impressions\n and notifies the ad of impressions using -\\[GADMediationNativeAd didRecordImpression:\\]. \n\n #### Declaration\n\n Swift \n\n optional func handlesUserImpressions() -\u003e Bool\n\n Objective-C \n\n - (BOOL)handlesUserImpressions;"]]