Forum Moderators: martinibuster

Message Too Old, No Replies

How to display Adsense ads that won't print

Any simple, permissible ways?

         

MikeNoLastName

4:53 am on Jul 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm probably just not thinking out-of-the-box tonight, but can anyone suggest a simple (no css or js) and permissible (by Adsense TOS) method for displaying Adsense ads on a page which will NOT print out when people print the page via ANY browser or OS?
We have some VERY popular pages (similar to fill-in forms) that people primarily go to IN ORDER TO PRINT, that we'd like to put adsense ads on, but it would not be acceptable if the ads printed on them.

Jenstar

5:04 am on Jul 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Why not run AdSense on them, then offer a link to a "printable version" that is excluded via robots.txt that has the forms without ads.

You could also set up that if anyone arrives at the printable version without having a referrer from the AdSense variation of the page, they could be automatically redirected to the one with AdSense first.

jetteroheller

5:30 am on Jul 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Your restrictions are nonsens.

AdSense is Javascript base. So the method can be also Javascript based.

I load on all my pages a JavaScript with

document.body.onbeforeprint=print_init;
document.body.onafterprint=print_exit;

All pages are based on

<div style=top:left:height:width>

You can in
print_init move the <DIVs> with the AdSense out of the area and move them back at print_exit

arrowman

10:06 am on Jul 22, 2005 (gmt 0)

10+ Year Member



I haven't done it yet (still on my todo list), but it's easy to create printer friendly pages with css.

Put the Google ads in a div with a class:

<div class="ads">Google code here</div>

Define a stylesheet for print media with:

div.ads { display: none; }

And attach it to your pages with:

<link rel="stylesheet" type="text/css" href="path/to/print.css" media="print" />

Google for: printer friendly pages css.