Welcome to WebmasterWorld Guest from 184.108.40.206
<div id='adsense' style='z-index:1; container:positioned; position:absolute; top:7; left:72%'>
google_ad_client = 'some number';
google_ad_width = 120; google_ad_height = 600; google_ad_format = '120x600_as';
This just puts the adsense panel at the top right of my page.
The page consists of search results on the left hand side, with adsense on the right.
Sometimes the search results are many, and the page gets long with plenty of vertical scrolling.
Can anyone suggest code or a link to help me make it so that, when the user scrolls down the page, the adsense panel follows the viewable screen, not the page - i.e. the user scrolls down but adsense stays there in the top right of the monitor..
Thanks for any ideas.
For your question, there are 2 ways I can suggest:
1) Keep the ad in a frame.
2) Look at Dynamic Drive site - they have menus they
stay on screen as you scroll. Personally, I find those
annoying, plus I am not sure if you'll be able to do
this without modifying AdSense code (which, as you know,
is not allowed).
And anyway something like that is IMO very annoying.
Also it is against the TOS to place adsense banners on search result pages
> And anyway something like that is IMO very annoying.
Guess I agree there too really
daugava: I was hoping to achieve whatever, by keeping the adsense code in a div, and then manipulating the div to avoid modifying Google's code.
All in all you guys are right, cheers for the heads-up ;-)
You've maybe saved me from a GoogleBoot... if I backtrack on what I've set up already..
A targeted ad will only appear in the frame if the coding "in the frame" is sufficient to warrant that ad being served there. Google do not take into account what you have in other frames appearing at the same time (as far as I can tell from their correspondence)
So although you could put the ad in a frame, you would have to have enough else in the frame to get a suitable targeted ad. Worst case scenario would be a PSA 'cos there was nothing in the frame to give you a targeted ad!
You also agree not to display any other text-based or content-targeted advertisement(s) on the same Web page in connection with which an Ad Unit or any Ad is displayed.
The results I'm talking about on my page definitely come under 'text-based ... advertisement(s)'
Yup, pulling it off... cheers guys
Phew. That's the fastest bit of cgi perl editing I've done in a while, wiping out those inclusions. I'm glad I wrote the script the way I did now, with everything in one variable $adsense..
Thanks for the good advice you guys.
Here's the canned email:
Thank you for making the requested changes to your account to comply with our policies. This will contribute to your ongoing success with Google AdSense and ensure consistency for your users' experience.
Probably stuck myself on some spam list but ****.