How to make Adsense ads are compatible with all devices Today I will speak about how to make Adsense ads are compatible with all devices. As I said, this exposure setups Your blog or different sizes and dimensions. For example Alouhh portable or "tablet" form displays the dimensions of 200x200 and forums that you are in a normal computer, you'll see the same website or blog, but the dimensions of 728x60 And for this I will introduce you to improve code Adsense ads and agreeing with all the appliances and that advertisements for concurrent and asynchronous How to make Adsense ads are compatible with devices First we have to have an account in Google Adsense then go to your Adsense from here And that you do not have an account you can do in your name and account with ease Read also how to work Adsense account and activated easily After logged into your account must create a new ad unit in my ads tab and choose any size and from the announcement after you save the announcement This code, which I will be inappropriate for people who have no experience with the css code, because this depends mainly on the css codes and codes of media Well, Here's the best way to make the Adsense ads are compatible with all devices and this Saviedkm php JavaScript works with both declarations and concurrent asynchronous The source code for asynchronous Adsense ads <div id="google-ads-1"></div> <script type="text/javascript"> /* Calculate the width of available ad space */ ad = document.getElementById('google-ads-1'); if (ad.getBoundingClientRect().width) { adWidth = ad.getBoundingClientRect().width; // for modern browsers } else { adWidth = ad.offsetWidth; // for old IE } /* Replace ca-pub-XXX with your AdSense Publisher ID */ google_ad_client = "ca-pub-xxx; /* Replace 1234567890 with the AdSense Ad Slot ID */ google_ad_slot = "1234567890"; /* Do not change anything after this line */ if ( adWidth >= 728 ) google_ad_size = ["728", "90"]; /* Leaderboard 728x90 */ else if ( adWidth >= 468 ) google_ad_size = ["468", "60"]; /* Banner (468 x 60) */ else if ( adWidth >= 336 ) google_ad_size = ["336", "280"]; /* Large Rectangle (336 x 280) */ else if ( adWidth >= 300 ) google_ad_size = ["300", "250"]; /* Medium Rectangle (300 x 250) */ else if ( adWidth >= 250 ) google_ad_size = ["250", "250"]; /* Square (250 x 250) */ else if ( adWidth >= 200 ) google_ad_size = ["200", "200"]; /* Small Square (200 x 200) */ else if ( adWidth >= 180 ) google_ad_size = ["180", "150"]; /* Small Rectangle (180 x 150) */ else google_ad_size = ["125", "125"]; /* Button (125 x 125) */ document.write ( '<ins style="display:inline-block;width:' + google_ad_size[0] + 'px;height:' + google_ad_size[1] + 'px" data-ad-client="' + google_ad_client + '" data-ad-slot="' + google_ad_slot + '"></ins>' ); (adsbygoogle = window.adsbygoogle || []).push({}); </script> <script async src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"> </script> Will change the existing code in red in your account number in the Adsense account and I mean this is the identification number and the number in the settings of your Google Adsense and consisting of 10 figures such as: 7,971,451,164 And then put the code after the tag <body> and then placed before the tag <data: post.body /> in your blog template and after converted in the Adsense codes adapter from here And any visitor will see after that Adsense ads are compatible with the device which is used And that I wanted to put several ads you put code several times with the announcement to change name google-ads-2 and google-ads-3 and forth Either your announcements Adsense concurrent code is: <div id="google-ads-1"></div> <script type="text/javascript"> /* Calculate the width of available ad space */ ad = document.getElementById('google-ads-1'); if (ad.getBoundingClientRect().width) { adWidth = ad.getBoundingClientRect().width; // for modern browsers } else { adWidth = ad.offsetWidth; // for old IE } /* Replace ca-pub-XXX with your AdSense Publisher ID */ google_ad_client = "ca-pub-XXX"; /* Replace 1234567890 with the AdSense Ad Slot ID */ google_ad_slot = "1234567890"; /* Do not change anything after this line */ if ( adWidth >= 728 ) google_ad_size = ["728", "90"]; /* Leaderboard 728x90 */ else if ( adWidth >= 468 ) google_ad_size = ["468", "60"]; /* Banner (468 x 60) */ else if ( adWidth >= 336 ) google_ad_size = ["336", "280"]; /* Large Rectangle (336 x 280) */ else if ( adWidth >= 300 ) google_ad_size = ["300", "250"]; /* Medium Rectangle (300 x 250) */ else if ( adWidth >= 250 ) google_ad_size = ["250", "250"]; /* Square (250 x 250) */ else if ( adWidth >= 200 ) google_ad_size = ["200", "200"]; /* Small Square (200 x 200) */ else if ( adWidth >= 180 ) google_ad_size = ["180", "150"]; /* Small Rectangle (180 x 150) */ else google_ad_size = ["125", "125"]; /* Button (125 x 125) */ google_ad_width = google_ad_size[0]; google_ad_height=google_ad_size[1]; </script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script> if you want to put Adsense ads in several places simultaneous multiple ads and you will have to put this code and follow the same steps that I mentioned for asynchronous Adsense ads
What about just using the "responsive ads"? They automatically change sizes for mobile devices, and change sizes when you switch from portrait to landscape mode.
These are the adsense Mobile ads Banners that are available in Different size. Mobile leaderboard (320x50) Large mobile banner (320x100) Small square (200x200) Square (250x250) Medium rectangle (300x250) Google adsense automatically adjust the ads size in mobile, Tablets and other types of Devices. So Don't Worry. above are the best sizes to show Mobile ads nd Boost your adsense revenue.
No need to follow the codes, I think. It is now very easy to create new responsive ads on your desired sizes.