Tuesday February 03, 2004
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 in Roller
at Feb 03 2004, 08:10:33 PM MST
10 Comments
Search This Site
Recent Entries
- Secure JSON Services with Play Scala and SecureSocial
- My What's New in Spring 3.1 Presentation
- Twitter's Open Source Summit: Bootstrap 2.0 Edition
- Refreshing AppFuse's UI with Twitter Bootstrap
- 2011 - A Year in Review
- Upgrading AppFuse to Spring Security 3.1 and Spring 3.1
- What have I been working on at Taleo?
- Our Engaging Trip to Paris and Antwerp
- My HTML5 with Play Scala, CoffeeScript and Jade Presentation from Devoxx 2011
- Deploying Java and Play Framework Apps to the Cloud with James Ward
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 #