How to integrate google adsense in webview (React native app)

646 views
Skip to first unread message

Charles Talbot

unread,
Jan 20, 2023, 3:32:42 PM1/20/23
to Google Mobile Ads SDK Developers
I believe React native abstracts away to WKWebView implementation, making this setup a little more complex, since the docs refer to an IOS app which accesses the webview directly. I'm trying to get this setup in my project now, and having some struggles ;( 

Mobile Ads SDK Forum Advisor

unread,
Jan 22, 2023, 10:16:07 PM1/22/23
to charli...@gmail.com, google-adm...@googlegroups.com

Hello Charles,

 

Thank you for reaching out to us.

 

With regard to your concern, kindly note that the Google Mobile Ads SDK only supports Android, iOS, Unity and Flutter platforms. But, you can refer to our documentation and Sample App for implementation on iOS.

 

Please let us know if you encounter any issues or errors.

 

Regards,

Google Logo
Zoilo Isagani
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2i0wxV:ref

Charles Talbot

unread,
Jan 23, 2023, 9:33:35 AM1/23/23
to mobile...@forumsupport.google, google-adm...@googlegroups.com
Thank you for the clarification, that is helpful to know. However I am hoping there may be a workaround for our requirements, which is to serve ads in our webview within our react native app, since react native apps build into IOS and android platforms. Do you know for a fact that the Google Ads SDK cannot be used with any react native app? The challenge seems to be in correctly registering the WKWebview instantiated in react native with the SDK. Maybe there could be a workaround for our app that could prove useful to others!

Mobile Ads SDK Forum Advisor

unread,
Jan 23, 2023, 2:16:08 PM1/23/23
to charli...@gmail.com, google-adm...@googlegroups.com
Hi Charles,

Thank you for having an interest implementing our Mobile Ads SDK on your app. I do understand your concern here. However, I'm afraid that we cannot provide further insight as the platform that you were using is not officially supported platform. What we can recommend at this point is to post your concern to other developer forum like StackOverflow.

Regards,
Google Logo
Teejay Wennie
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2i0wxV:ref

Charles Talbot

unread,
Jan 23, 2023, 3:26:06 PM1/23/23
to Mobile Ads SDK Forum Advisor, google-adm...@googlegroups.com
Thank you for the reply, I will certainly reach out to some other developers for advice there. Out of curiosity, is there any guidance at all around ad content served in webviews on unsupported platforms, such as passing through an advertising ID to that web view, or leveraging an IDFA (iOS) or AAID (Android)? Since the website we are displaying in our webview is already leveraging Google Ad Manager. Thanks!

Mobile Ads SDK Forum Advisor

unread,
Jan 23, 2023, 11:02:38 PM1/23/23
to charli...@gmail.com, google-adm...@googlegroups.com

Hello Charles,

 

We appreciate your willingness to use Mobile Ads SDK for react native but unfortunately, we have no documents or guidance that would support this implementation. Although, there are multiple open source resources that you could use. You can check out Google Play's data disclosure requirements and IDFA Support for supported platforms only but could be used for references.

 

Regards,

Google Logo
Zoilo Isagani
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2i0wxV:ref
Reply all
Reply to author
Forward
0 new messages