Return to Snippet

Revision: 63932
at June 19, 2013 00:10 by yanseo


Updated Code
<script type="text/javascript">
    google_ad_client = "ca-publisher-id";
    width = document.documentElement.clientWidth;
    google_ad_slot = "1234567890";
    google_ad_width = 320;
    google_ad_height = 50;
        if (width > 500) {
        google_ad_slot = "3456789012";
        google_ad_width = 468;
        google_ad_height = 60;
    }
    if (width > 800) {
        google_ad_slot = "2345678901";
        google_ad_width = 728;
       google_ad_height = 90;
    }
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

Revision: 63931
at June 19, 2013 00:02 by yanseo


Initial Code
<script type="text/javascript">
    google_ad_client = "ca-publisher-id";
    width = document.documentElement.clientWidth;
    google_ad_slot = "9419222944";
	google_ad_width = 468;
	google_ad_height = 60;
    	if (width >= 500) {
        google_ad_slot = "9204481740";
		google_ad_width = 320;
		google_ad_height = 50;
    }
    if (width > 800) {
        google_ad_slot = "2345678901";
        google_ad_width = 728;
    	google_ad_height = 90;
    }
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

Initial URL


Initial Description
If you're using Adsense on responsive design, this is the code that you can use and it's NOT against its TOS.

Initial Title
Responsive Adsense Code

Initial Tags


Initial Language
JavaScript