JenSense has the scoop on a new feature for AdSense for Search. You can now open up your results on a page on your own site instead of on Google's site. Those of you who didn't like AdSense for Search because it sent away traffic might like this. Details here.
I've set it up on my site, and it works great, however if the visitor's Google prefs are set to show more than 10 results per page, then that also seems to be in effect for the site search as well, and the results for page 2 and on don't fit in the iframe. I sent a bug report to Google about that, so let's hope they fix it up.
Good find! I don't read Jensense nearly as much as I should. This will definitely come in handy; I dislike the current option we have, so this should open more options.
You fix the problem by setting the frame width to 700 and the length to any size you wish. Then you add this style to your header which will give you a vertical scrollbar in the iframe for your search results: <style> #googleSearchUnitIframe iframe { overflow: auto; } </style> <!-- Google Search Result Snippet Begins --> <div id="googleSearchUnitIframe"></div> <script type="text/javascript"> var googleSearchIframeName = 'googleSearchUnitIframe'; var googleSearchFrameWidth = 700; var googleSearchFrameHeight = 1000; var googleSearchFrameborder = 0 ; </script> <script type="text/javascript" src="http://www.google.com/afsonline/show_afs_search.js"> </script> <!-- Google Search Result Snippet Ends --> You can also add your search box to the same page. Have a look at this page for a quick example I put together: http://www.kwathabeng.co.za/search.html What I still don't like about it is that the clicks open in the same tab or window and therefore replace your window. I tried adding the following to the search: <input type="hidden" name="newwindow" value="1"> and this: <BASE TARGET="_blank"> but neither help. Maybe someone can help with this one.
Hey nice to see this. Adsense for search has very much potential. Google pays very reasonalbe amount of search Ads.
I can't seem to get the scrolling to work in IE7b3. It only seems to work in FireFox (my preference). However 90% of people still using IE(6). Can someone tell me what I've missed here? http://www.kwathabeng.co.za/search.htnl Thanks
kwathabeng, it also only works for me in Firefox for Mac, but not Safari. The only way I can make the width work is with this: <style> #googleSearchUnitIframe iframe { overflow: auto; width:630; } </style> No other style attributes, such as scrolling, seem to work as G over-rides them in the js file.
Cool, very very cool! I just put it on our Wiki. Looks great ;-) http://www.otterstedt.de/wiki/index.php/Hauptseite (See Google-Searchbox on the left)
I'm having some trouble adjusting the size of it, I want to give the ifram a width of 500 (as apposed to the default of 650) but no matter how small I make it in the hode it doesn't appear any smaller on the page, it will go larger though. Any ideas?
I just got it setup on one of my sites as a test run. Everything looks good so far, but I wonder how this will affect CTR?
Hi maney, I'm afraid, you are not allowed to change the code, or did I overlook a place to change the width on the setup pages?
This is a cool new addition to AdSense for Search they finally added. But Otterstedt is right, you are not allowed to edit this code at all, such as to change the iframe size or to attempt to open the resulting clicks in a new window. Changing the code is a violation of the terms/policies, so I wouldn't do it, unless you want to rack up a compliancy warning on your AdSense account, I suspect this is one they will be watching closely to prevent any abuse
I can't believe people still don't "get" that they can't just manipulate the Adsense codes to anything they want yet. I mean, come on, people, are we all noobs here or what...?
<scratches coding a site search off his list of things to do> If I can get this to show up well in my ColdFusion pages, it's going to save me alot of time.
OK, I got the scrolling working now on IE7 (sort of). IE is way different to FireFox. Have another look at: http://www.kwathabeng.co.za/search.html jackburton2006 please take note: it's done without manipulating the Adsense code. Google give you enough variables to play with to manipulate the output. NB: Sorry, but I can't post live links as yet. You'll have to use the old copy and paste method.
If you are changing the code in any way to something different from what you get from your AdSense control panel, it is considered manipulating the AdSense code, and it is against the AdSense terms.
As Jenstar said, you better be able to change what you're changing via Adsense's wizard, otherwise you are manipulating the codes outside Adsense's parameters.