I know this spans both Adsense and YPN, but I thought I figured I'd post it here... I'd like to have both Adsense and YPN ads on my site(s), but not at the same time. I know that several people here do this and it is within the TOS. My question is, what is the best way to implement this? I have an idea, but I'm not a PHP guru so I'm not sure it will work. I know others that are better at it than me have done it, so I thought I'd see what design they use. My idea was to create a php file that generates a random number (mod 2) and has a function for each ad block. The functions return Google or Yahoo ads depending on the random number. Is this the best way or do you have something more creative?
I know several people here do it and have asked Google if it was ok. As long as the Google ads and Yahoo ads never show up on the same page at the same time it is ok.
there's a free script which switches between adsense and ypn. I think I saw it on www.thirdsquare.com and somewhere alse.. just look around or make a quick search in google
I do something like that, but I get the current time, take the seconds mod 10, and run YPN if it's greater than 8 (I don't want YPN running very often - I found it didn't pay well and the ads often aren't relevant - so I do it just to shake things up a bit and fight ad blindeness). On weekends I run YPN a little more often because my weekends don't as well and now and then a good paying YPN ad hits. When YPN *does* hit it usually pays more than Adsense - if only its ctr were anywhere near as good it would be wonderful! In another part of my site, I create a hash from the page name, modulo that down to some smaller number, and run ads based on that value. That keeps the same ads on the same pages but gives variety between pages.
Thanks everyone. I did a quick search on google which led me to problogger, which led me to jensense, which led me to shoemoney... http://www.shoemoney.com/2005/09/12/code-to-rotate-easily-between-adsense-and-ypn/ All that for ~5 lines of code! I didn't realize it would be that simple.
But it's NOT that simple if you want (for example) to run a skyscraper at the top and a link unit at the end - using code like that could mix ypn and adsense. That's where my idea of hashing the url comes in - that always hashes to the same number, so the same type of ad always runs on that particular page.
Competitive Ads and Services We do not permit Google ads or search boxes accessing Google search services to be published on web pages that also contain what could be considered competing ads or services. If you have elected to receive contextually-targeted Google ads, this would include all other contextually-targeted ads or links on the same page as Google ads. This would also include ads throughout the site that mimic Google ads or otherwise appear to be associated with Google on your site. Although you may sell ads directly on your site, it is your responsibility to ensure these ads do not mimic Google ads. If you have elected to receive Google search services, this would include other search services on the same site and non-Google query-targeted ads. We do allow affiliate or limited-text links. source: https://www.google.com/adsense/policies Guess pcunix`s ideea its more good, in that way dont risk when navigate on your site to see next page a competitive ads ..
Maybe for some people, but it didn't for me and it didn't for Darren Rowse either ( http://www.problogger.net/archives/2006/01/23/switching-back-to-adsense-from-ypn/ ) YPN seems to have far less ad inventory and (at least for my site) doesn't do as well for relevancy. The payout per click was higher, but the CTR was far, far lower so it just did not work well. As I said, I still run it a bit just for variety, but I'm back to mostly Adsense. And I think that's too bad: Google needs more competition. They are very unresponsive to smaller advertisers - I get around $1,000 a month from them and I might as well not exist - too small for them to pay any attention to. I don't know how big you have to be to get any respect, but obviously that isn't nearly enough.