Approved for Google Ads
After seeing that Tim Bray is making $500/month of Google Ads, I decided it was high time I try to get this site approved again. Low and behold it worked! So they've approved me, but I only want to show them when folks come from Google. As in, when the referer (yeah, I know that's spelled wrong, but it is in Java and JavaScript too) contains "google" - show the ads. Anyone know how to do this cleanly in Roller/Velocity? Or JavaScript? I tried the following, but it doesn't work:
if (document.referer != null && document.referer.toString().indexOf("google") != -1) { // define variables document.write("<scr" + "ipt type='text/javascript' src='ads.js'><\/scr" + "ipt>"); }
Since Google is my top referrer - I think I'll get a fair amount of users seeing the ads, and it won't disturb the folks who come here just to read my ramblings.
Posted by Keith Sader on February 04, 2004 at 01:36 PM MST #
Posted by Daniel Allen on February 04, 2004 at 03:09 PM MST #
Posted by Daniel Allen on February 04, 2004 at 03:16 PM MST #
Posted by Matt Raible on February 04, 2004 at 06:14 PM MST #
Posted by Koz on February 04, 2004 at 08:49 PM MST #
Posted by Koz on February 04, 2004 at 08:51 PM MST #
Posted by Matt Raible on February 04, 2004 at 08:52 PM MST #
Koz - thanks for the assurance that it was possible. You got me thinking and by moving the <div>'s before/after the <script> tag - it solved the problem.
Posted by Matt Raible on February 05, 2004 at 03:33 AM MST #
Good luck with adsense. I've just started with them too. I like your idea of just showing the ads to folks who come from google. I wanted to add a CSS-based "hide ads" link to my page. But I think it violates Google's terms and conditions...
My gripe right now is that half the ads showing up at my site are for blogging software, rather than Java-related things.
Posted by David Flanagan on February 06, 2004 at 05:45 AM MST #
Posted by Fun and Humor and Jokes on August 24, 2005 at 08:02 AM MDT #