How to insert Admob ads into a mobile HTML5 website

7,575 views
Skip to first unread message

Doug Arnold

unread,
Dec 4, 2013, 10:49:52 PM12/4/13
to google-adm...@googlegroups.com
Hi,

I'm in the process of developing some very basic web info apps that are pretty much apps based on HTML 5. I already know how to insert Adsense ads into my websites, and inserting them into a mobile site wouldn't be that much more difficult.

However, if I wanted to convert my mobile website into an app, I have to use Admob. But, the only problem is, HOW DO YOU DO IT ???? How do I get the code to insert into my HTML code so that I can then convert my mobile website with the AdMob code?

I already have signed up for Admob, and when I try to add a new Android app, it gives me a link to download the SDK, and go from there, but I can't seem to install any of the SDK, Eclipse, or anything like that. Would it be better for me to upload it to the Google Play Store first, then try to ad Admob code to it?

For a basic webapp made in HTML and then converted to an APK to upload to Google Play Store, surely there must be a way of inserting a bit of coe (ie XML) into the original website script ?

Can someone help me out here?

Doug

William Ferguson

unread,
Dec 5, 2013, 5:57:58 PM12/5/13
to google-adm...@googlegroups.com
Doug it really hinges around what you mean by "convert my mobile website into an app'.

If you mean rewrite the HTML of your mobile web site as an Android/iOS app then your are going to be coding in Java/ObjectiveC. And you will need to download the respective Admob library and embed that into your app.

If you mean create a thin Android/iOS app that is really just a wrapper around a WebView that displays the HTML for your web site, then I imagine you can continue to use Adsense. But the UX for your app is not going to be great if there is any level of interaction.

William

Doug Arnold

unread,
Feb 23, 2014, 8:43:33 AM2/23/14
to google-adm...@googlegroups.com
Hi William,

No, all I want to do is insert AdMob code into my mobile websites (html5) the same way I insert adsense code into my normal desktop site (ie usually starts off with <script>.... </script> )

Can this be done (ie without needing to install the SDK) ?

Doug

William Ferguson

unread,
Feb 23, 2014, 3:03:14 PM2/23/14
to google-adm...@googlegroups.com
Admob is strictly for native apps, there is no HTML SDK.

You should be able to continue to use Adsense.

William

Doug Arnold

unread,
Feb 23, 2014, 3:06:09 PM2/23/14
to google-adm...@googlegroups.com

But it is against the TOS to use adsense on mobile web apps, is it not?

> --
>  
> ---
> You received this message because you are subscribed to a topic in the Google Groups "Google AdMob Ads Developers" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/QKlryWlEzvs/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to google-admob-ads...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

William Ferguson

unread,
Feb 23, 2014, 3:09:55 PM2/23/14
to google-adm...@googlegroups.com
I don't know.
I've never used Adsense.

Ukpere Goodson

unread,
Feb 24, 2014, 8:19:19 AM2/24/14
to google-adm...@googlegroups.com
So you are saying if I use an iframe in my HTML5 app, that links to a webpage on the internet containing only the google adsense html for my adsense account, it breeches the TOS? becaise that's the only option for HTML5 apps.

*i was being a literal as a TOS*
Message has been deleted

Doug Arnold

unread,
Feb 24, 2014, 8:25:21 AM2/24/14
to google-adm...@googlegroups.com

I'm pretty sure that's what the TOS say. If you use adsense on your mobile site, then convert that site to an app, you are in violation of the TOS. I have a few mobile sites that would make brilliant apps, but I don't want to risk my Adsense account. If I can't figure out how to put Admob on my HTML5 sites(I can't get the SDK to install on my computer for sone reason...always comes up with errors no matter what I do), I'll have to put ads from Leadbolt (or something like that)


On 24/02/2014 11:19 PM, "Ukpere Goodson" <chu...@gmail.com> wrote:
>
> So you are saying if I use an iframe in my HTML5 app, that links to a webpage on the internet containing only the google adsense html for my adsense account, it breeches the TOS? becaise that's the only option for HTML5 apps.
>
> *i was being a literal as a TOS*
>

William Ferguson

unread,
Feb 24, 2014, 4:57:33 PM2/24/14
to google-adm...@googlegroups.com

OK. So you want to present HTML in your app but you want to present advertising but believe you can't use AdSense due to TOS.

You could use WebView to show HTML and then use an AdView advice or below that to show advertising.

What platform are you targeting?

Shahadat Hossain

unread,
Oct 7, 2024, 5:54:00 AM10/7/24
to Google Mobile Ads SDK Developers
There is a way to use Google AdSense in HTML files Read this article:  How to use AdSense in Android WebView?

But there is confusion. 
  • Do I need to keep those HTML files on a website where that specific domain is AdSense-approved. , or
  • I can simply add AdSense code in HTML files, and keep those HTML files in assets folder

No one from Google clarified that. 

Mobile Ads SDK Forum Advisor

unread,
Oct 7, 2024, 2:49:47 PM10/7/24
to sonia...@gmail.com, google-adm...@googlegroups.com

Hi,

Thank you for contacting the Mobile Ads SDK Support team.

Please note that our support channel can only best assist you with regards to Google Mobile Ads SDK implementation and technical issues. As this query is beyond the scope of our team's expertise, I would recommend that you reach out to the AdSense Product support team as they are better equipped to address your concern effectively.

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

Thanks,
 
Google Logo Mobile Ads SDK Team


Reply all
Reply to author
Forward
0 new messages