سؤال

I'm a site owner, currently using Adsense to monetize. I've decided to change my site design to a responsive design so that the website can present itself appropriately on a variety of screen sizes, but unfortunately Adsense isn't very flexible with regards to this. It's relatively simple to simply hide large desktop advertising when the screen width gets too small, but this isn't good for revenue and from what I've read might be against Google's Terms Of Service.

Can anyone think of any way to do something with Adsense so it works intuitively with a responsive design?

هل كانت مفيدة؟

المحلول

Google now has Responsive ad units: https://support.google.com/adsense/answer/3543893

نصائح أخرى

I guess, under your account you might be set up several AdSense units for several dimensions Google offers. Then with Javascript on page load, decide what ad unit to use, based on the screen width and list of available unit dimensions, and inject the corresponding AdSense unit HTML code dynamically:

This should allow you to progressively downgrade the ad width to as low as 120 pixels. Don't know about the TOS however, but the technique looks fairly legal to me.

If for example jQuery would be used and the advertisement should be placed right after the main page title <h1>, something like this would do:

$('The HTML code for the AdSense unit goes here').insertAfter('h1');

You really haven't provided enough information. As you obviously know a "responsive design" can be as simple as floating your content so elements slide underneath each other when they don't fit horizontally.

Therefore you can just float your Adsense iframe to either side of your floated content and drop it underneath everything else when it doesn't fit on screen.

However since you haven't provided a link or any details about your site I have no idea whether that would be acceptable to you. Given you can't change the scale of the AdSense without creating problems for yourself I don't see any other choice you have.

Based on your subresponse, it sounds like this is a mobile ad unit issue. Note that Adsense isn't going to count a web display size (ie: 728x90) on a mobile unit, even if it shows up when you view the page on your mobile browser.

Instead you should use a mobile banner (ie: 320x50) on your mobile page.

Let me know if you have any more questions.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top