Native ads click event

22 views
Skip to first unread message

Banele Goodenough

unread,
May 20, 2024, 12:28:36 AMMay 20
to Google Mobile Ads SDK Developers
Hi, 

Is it possible to get destination url when clicking on a Native ad?  I have already displayed the ads now when I click on its, it doesn't do anything.

Note: using a test adunitid

Mobile Ads SDK Forum Advisor

unread,
May 20, 2024, 5:16:46 AMMay 20
to banel...@gmail.com, google-adm...@googlegroups.com
Hi,

Mobile ads SDK doesn't have any method which will help to fetch destination URL directly through the code.Incase your action is not working then you can go for custom button redirection integration with the help of adCallToAction method which is mentioned below.

Firstly, you will have to create a Native AdView object and set the constraints to fill its container. Once it is done, you will have to associate the content ad view with the content ad objects. This is required to make the ads clickable. Then populate the content ad view with its respective assets.
While populating the AdView with NativeAd assets make sure that you set 
nativeAdView.callToActionView = unifiedAdBinding.adCallToAction
The NativeAdView will automatically handle clicks on registered views. The Google Mobile Ads SDK processes clicks and directs the user to the appropriate destination URL associated with the ad.

 
This message is in relation to case "ref:!00D1U01174p.!5004Q02tJ1jV:ref" (ADR-00235662)

Thanks,
 
Google Logo Mobile Ads SDK Team


Reply all
Reply to author
Forward
0 new messages