Sunday 28 April 2013

How to Use Google AdSense Ads on your Responsive Website

Responsive web design is a simple but a powerful technique to makes a website looks good as compare to others website, whether mobile phones, tablets, PCs and even TVs. Google recommends sensible design approach for improved indexing and maintaining content for PC and mobile in a single URL. A few weeks ago we explained in a tutorial on How to Re size web page content regardless of the device used to browse the web, probably serve them.

Turning to the post, if you use Google ads on our site we realize that perhaps our content but we can re size the announcements of Google not because it has a fixed width and we will not re size based on the size of the device .

for example if we are using on our Google adsense on website an announcement of 728x90px, which looks good on our computer, but in a mobile device with 320px wide announcement extends beyond the screen, definitely our design looks out of position.

For this you can use JavaScript code for the ads to respond to the size of the screen. You can create multiple ad units that you can placed on the screen size of the user's device, use the most appropriate format.

Obviously they have to change the values ​​of Google_ad_client and Google_ad_slot, values ​​that appear in their ads.

How can see you in the code is the property inner Width, you get the pixel width of the browser window, which makes the main process. Once you know your value serving the ad in question. 

0 comments:

Post a Comment