Forum Moderators: martinibuster
1024 x 768 59.5%
1280 x 1024 22.7%
800 x 600 6.7%
1152 x 864 5.3%
1600 x 1200 2.2%
other 3.6%
So I could place an add on any screen biger than
1024+120 width. This is about 1/3 of all visitors.
Most of the 3,6% other could be notebooks with
1400x1050 or 1280x800 wide screen of 1440x960 wide screen.
This additional add should only be shown on big screens, because I do not want horizontal scrolling.
So any idea how to make this?
<SCRIPT LANGUAGE="JavaScript">
<!--
if (screen.width < 1024) { window.location="oneadsensebox/index.htm";
}
if (screen.width >= 1025) { window.location="extraadsensebox/index.htm";
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
Of course you'll want to disallow Googlebot to one of the directories while making sure to ot disallow mediapartners bot.
if (screen.width >= 1025) {
document.write ( "Here goes the AdSense Code" );
}
But because the AdSense Code is in "", it would be necessary to \" all " in the AdSense code, what could be seen as a change of the code.
I search for a solution, to make it like this, but within TOS
So... depending on what the cookies says, I serve a content area of either either 760px in width (for 800x600 res) or 955px in width (for 1024x768 & greater res).... with the only difference being an extra column for another adsense block.
An easy way to do add this to an existing site is to place your already-existing content into a table.
For example, you would use the following on your old page:
<table>
<tr>
<td width="760"><!-- existing content goes here --></td>
</tr>
</table>
If the cookie, indicated a larger screen res, you would simply make the changes listed in bold:
<table>
<tr>
<td width="760"><!-- old page goes here --></td>
<td width="195"><!-- new column here --></td>
</tr>
</table>
This new table could wrap your entire page... or just the content portion between top & bottom headers... each site is going to be unique in how exactly it is implemented, but the above gives you the general idea of one way to go about it.
With the combined use of javascript, cookies, and php, adding that extra column for larger screen res isn't terribly difficult... however, does require editting of your existing pages.... which in my own experience, is well worth the effort due to the extra impressions/clicks that it will generate.
If you already use fixed-width table sizes (ie. width=760)... you could merely add a php-include that contained the new AdSense block... and position it with CSS wihout having to modify your existing table stucture.
However, if you used a relative table-width (ie. width=90%), you would have to make the edits depending on the size... as positioning the extra AdSense block via CSS would most-likely cause it to be placed on top of your existing content.