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 07:36 AM MST #
Posted by Daniel Allen on February 04, 2004 at 09:09 AM MST #
Posted by Daniel Allen on February 04, 2004 at 09:16 AM MST #
Posted by Matt Raible on February 04, 2004 at 12:14 PM MST #
Posted by Koz on February 04, 2004 at 02:49 PM MST #
Posted by Koz on February 04, 2004 at 02:51 PM MST #
Posted by Matt Raible on February 04, 2004 at 02: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 04, 2004 at 09:33 PM 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 05, 2004 at 11:45 PM MST #
Posted by Fun and Humor and Jokes on August 24, 2005 at 02:02 AM MDT #