Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Could support be added for Adsense for Mobile https://www.google.com/adsense/mobile-settings ? The ads are usually enabled with PHP https://www.google.com/adsense/support/bin/answer.py?hl=en&answer=75763
Thanks
Comments
Comment #1
mchelenComment #2
jcnventura CreditAttribution: jcnventura commentedIt could.. I'll put it in the 'nice to have' list.
João
Comment #3
CinemaSaville CreditAttribution: CinemaSaville commentedI'd like to request this as well. Putting together a mobile site that could use it.
Thanks.
Comment #4
dimon00 CreditAttribution: dimon00 commentedAny news on this request?
Comment #5
jcnventura CreditAttribution: jcnventura commentedThey still haven't enabled AdSense for mobile in my country.. I have no way of finding out how this affects the existing code.
See https://support.google.com/adsense/answer/68728?hl=en
Comment #6
androidado CreditAttribution: androidado commentedHello
There's an aproach that chances the AD javascript by the window width, maybe this should be easy to implement and have all the resources from this great Module!
google_ad_client = "ca-publisher-id"; if (window.innerWidth >= 800) { google_ad_slot = "ad-unit-1"; google_ad_width = 728; google_ad_height = 60; } else if (window.innerWidth < 400) { google_ad_slot = "ad-unit-2"; google_ad_width = 300; google_ad_height = 250; } else { google_ad_slot = "ad-unit-3"; google_ad_width = 468; google_ad_height = 60; }From this link: http://www.labnol.org/internet/google-adsense-responsive-design/25252/
Comment #7
sk33lz CreditAttribution: sk33lz commentedI just came here to post an issue about the above exact code. It may be the best solution for serving ads to any size device, as one could potentially set both the breakpoints and the ad units within a "responsive ad unit" in the block settings. I don't think there is any specific need to link into Adsense for Mobile with this approach.
Comment #8
simeonabiola CreditAttribution: simeonabiola commentedSee what i did
http://drupal.org/node/1647358#comment-6933310
Comment #9
scothar CreditAttribution: scothar commentedI've been using the labnol script hardcoded into blocks for several months. Works like a charm hand-in-hand with a properly coded responsive theme. I have direct access to Google AdSense personnel and have waved my implementation in their faces several times now. No complaints yet.
Is this something worth writing a module for? ...because the AdSense module as is doesn't allow for the multiple ad unit definitions per display ad unit that this solution requires...
Haven't tried this with a purely liquid layout as that might require Ajax-like reloads and that is explicitly against the AdSense rules and regs. I've also seen folks using "max-width: 728, height: auto" - which is also contrary to the rules and regs. The labnol script is the only semi-Google-recommended solution I've seen...
Comment #10
jcnventura CreditAttribution: jcnventura commentedComment #11
likewhoa CreditAttribution: likewhoa commentedmobile traffic is a big factor now, setting this as a tasks and priority to major since mobile ad units have been around for years now.
Comment #12
jcnventura CreditAttribution: jcnventura commentedYou can set it to anything you like. That doesn't change the two simple facts of:
1. AdSense for mobile is not accessible to me (module maintainer) as my country is still not in the list.
2. This AdSense for mobile is good "If your site supports mobile devices such as feature phones that utilize WAP or i-mode, you'll need to use AdSense for mobile to generate your ad code". WAP?? i-mode? WTF?
Use responsive ads, which the module does support already.
Comment #13
jcnventura CreditAttribution: jcnventura commentedHonestly, I don't think I'll ever be able to test this. Google will probably retire this soon anyway.