11) Show Ad 1 30% of the time, Ad 2 70% of the time

12) Show Ad1 1000 times, then Ad2 1000 times, then Ad3 1000 times

Create 3 contexts and their code, named ad1, ad2 and ad3, with the following rules :

ad1:

ad2:

ad3:

Then insert context ad3.

13) Let's get a bit crazy

You can of course create the most complex display rules if you really need them. Like: on single post pages, always display to Search Engines visitors, display on old posts excepts if visitor is not a regular reader, but above all, never display ads to yourself ? Weeeeeeeee:

IV. Conclusion

Who Sees Ads is the Ultimate Ad Management plugin, I hope you're convinced by now.

You can use it, of course, to display quite everything, not just ads: greetings, help messages, temporary notices, images, text. Anything.

Holllly sh*t! YOU ARE CRAZY OZH!!! This is by far the most extensive/best ads management system I've seen–and believe me I have a folder called "Monetization Plugins" =P…But I'll need some work on this with all the php goodies., plus I got to see if it screw up Adsense Deluxe or Manager….

Reason is: on my blog Adense shows a lot of CPM banners, which is really good and I'm really happy with. Problem is: most of my regular visitors and/or logged in users aren't going to click the same ad multiple times, which leads to a very low CTR (high views, low clicks). So I need to show my regulars/known members the affiliate program banners and my new visitors the Adsense CPM banner.

And now for the catch: as an admin I'd still like to see the Adsense CPC/CPM banners, because I'd like to check what kind of ads are being displayed.

What ruleset should I need for this??? I just can't seem to make it work :-( What I'd really like to see is a lot more NOT conditions, like:
if ![Regular Reader] then [Display]

Thanks for the feedback, will try your ruleset. Just to clarify for your rules:
1. The Affiliate rule comes first with an handover to Adsense?
2. The admin check should be "if ![current_user_can('manage options') then [Display];" ?

Jean-Paul Horn Â» Yes, the "is admin" is your perfect current_user_can() use. And no, there's no need for a "fall back to" rule. As far as I understand what you need, the 2 rule sets are mutually exclusive. Just add the two context calls, and only one should display.

Aaaaaaaaaaaaaah! (insert big light bulb here). I got you! I was trying to fix this rule by calling just one ruleset, but somehow forgot you could insert multiple php calls (or template calls) next to eachother :D

Hi Ozh .. sorry to bother again. Tried to post this earlier, but there were some MySQL errors. I just can't seem to get the admin check working, whether I try current_user_can('level_10') or current_user_can('manage_options'). It just looks like WSA completely ignores the rule (Adsense first (admin display), Affiliate 2nd (admin don't display)). Any advice?

Also: I noticed you bumped the version number to 1.3.. is this released yet? Couldn't find a changelog or a comment from you. Thanks!

Very, very nice plugin! I just implemented a plugin to show my blog in iPhone format and had to change my ads to 250 px max. Today I found your plugin and started to think if there's a possibility to use the advanced rules to do something like:

Leo Borges » The screen resolution is a *client* side setting, ie something the browser knows, but the server doesnt. So you can't do what you're thinking about.
Without digging much I think there are 2 options:

– server side: detect user agent. Something like if user-agent is something show ad1; else show ad2. There are examples of this in the plugin comments and/or the example page

– client side: have your adsense or whatever change according to screen resolution, using only one context. Something like:

I made a little plugin that works with yours to automatically insert ads into posts. It's relatively static since it's really just for use on Web Developer News and Attackr, but I think it's something you should consider adding to your plugin. This one checks the number of paragraphs, and then inserts the ad at a random position between them.

I'd also be interested in seeing the ability to re-use rules in a context. I think it would be nice to say:
If Visitor is from a search engine – displayIf post is older than 365 days – display
If visitor is a regular reader – Don't DisplayIf post is older than 15 days – display

This way, even regular visitors get ads on really old posts, but everyone gets ads on post that are more than 15 days old.

Ozh: I love this plugin but I have a question for you – I want it so that if a visitor comes from a search engine it shows them my ads for their entire visit, not just the first page they land on. Is this possible?

Hi Ozh,
Thanks God I found your plugin! I need it to prevent clickfraud from certain country. However, there is some bugs of this plugin which you may need to know for future development.
I use wordpress 2.8 and I found that the "if Any Condition" syntax is override anything. Like I set the rules to hide adsense in from visitors come from my country. When I use the wp_ozh_getCountryCode(0)==’id’ don't display code along with if anything code, the result is:
It shows ads to all condition, even I block the id country.
However if I use wp_ozh_getCountryCode(0)==’id’ don't display only, it blocks ALL country because I don't even get any impression in my adsense account.

I hope this report can help you fix the future release, and I'm really waiting for it :)

Anyway to have just search engine visitors see the ad just 30% of the time. The problem is when I and the 30% rule it displays to every one else. I can add the rule or don;t show to regular visitors but then the search engine visitors won;t see it because I am setting the regular visitors to 0 pages. Basically I just want any traffic from the search engines to have a 30% chance to see the ad without affecting anyone else.

Chris » This doesn't make sense to me but well, anyway… The way I'd do it would be with a custom function (for instance in your theme's function.php) that would check the result from wp_ozh_wsa_is_fromsearchengine() and return true with a 30% chance. Then use an advanced display rule with this function.

i need to disable ad after 10 view times per session .i mean if user saw ad 10 times at same session as refreshing the same page or navigating my site then disable ad but if he closes the browser and come again after aperiod of time he can see the ad again.can i do that plz help

Sean O » so what if the visitor does not come from a search engine, or is not a regular reader? You didn't define any rule for this case. Add a third rule with "if any condition then display" and that will be the default behavior.

Hi,
Is it possible to write a rule based on search engine search terms? For example: "if user search for "wordpress" then display".

I am also interested in learning how to do this. But the situation I am interested in is that of "then do NOT display" for search terms I know people are using to find my page (because I checked my stats) and I know these search terms do not result in conversions. So I want to filter out the search terms that I know will result in traffic that will not click on my ads. Is there a way to do this?

But of course, this plug-in is an absolute gem. I love it. I wish you can modify it so it can be used on an mu/multisite where multiple authors/bloggers will be able to enter their pub id and allow percentage sharing between the blogger and the superadmin.

I want a little more advanced context. Like in my site, I have the Facebook Social Plugin and as you know Facebook is blocked in many companies. Is it possible to find if a user is behind a proxy(probably that is the way to find if Facebook plugin is getting blocked), so that I don't show the plugin and the page loads faster?

Hi. Your plugin looks amazing but I'm wondering if it's possible to add some kind of filter to protect my sites from invalid clicks. For example,
if (the same ad is clicked more than 2 times)
{
disable all ads for that IP address
}

Hi Admin,
Hope you will be fine. I want some best Configuration for my adsense ads because i want to save my adsense account from click bombing. please anyone tell me some best solution for this. its a request. Thank you.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> Gravatars: Curious about the little images next to each commenter's name ? Go to Gravatar and sign for a free accountSpam: Various spam plugins may be activated. I'll put pins in a Voodoo doll if you spam me.

I love WordPress plugins so I wrote a book!

This site

This is planetOzh, weblog of Ozh, a 35 years old dude living in France with an interest for, errr, like, computer things. I have a wife, 2 kids, and one computer-unrelated job. Give my eye a gentle click to read more about me.

This page

This page was written on 2007 / September / 03 (11 years 2 months 3 weeks and 2 days ago)