Here are a few example of display rules you can use with the plugin Who Sees Ads
I. Simple rules
These rules use "core" conditions that are enabled by default. To understand the logical flow, read rules in ascending order and mentally insert "otherwise" between each.
1) Display ads on older posts

2) Display ads for everybody except regular readers

3) Display for Search Engines visitors and on older posts, but never for regular readers

4) Display for everybody except regular readers and logged in users

5) Display for one month only

6) Display 2000 times only

II. Advanced rules
If you have the guts or need even more flexibility, edit the beginning of the plugin to have the following:
-
$wp_ozh_wsa['iknowphp'] = true;
This will enable advanced condition where you can use PHP code and function calls. Be warn: from now on, you're on your own and can break things :)
7) Display on home page only

8) Display everywhere except on home page

Or, this is the same :

9) Display 30% of the time

10) Display only to US readers
Feeling the need to geotarget your content? For this, you will need first to install the (excellent) plugin IP to Nation. Then, simply create a context with the following rule:

III. Hurt Me Plenty
Still not convinced ? Or you need even more flexibility and power ? Dude. What about creating rules that make several ads interact then ?
11) Show Ad 1 30% of the time, Ad 2 70% of the time
Create two contexts : ad1 and ad2.
Context ad1 would be:

Context ad2 would then be:

Now, simply insert context ad1 in your pages or post. Awesome, isn't it.
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.
pingback on 03/Sep/07 at 10:04 pm # :
[...] also gathered a few example display rules to help you create simple, complex or totally crazy [...]
said, on 22/Sep/07 at 8:36 am # :
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....
commented, on 14/Oct/07 at 1:52 am # :
Hi Ozh,
I'm having a hard time getting an advanced rule to work. I'd like to have this:
Context: Affiliate
if [Regular Reader] then [Display];
if [Logged In] then [Display];
if ![current_user_can('manage options') then [Display];
if Previous Conditions Fail, try context [Adsense]
---affiliate program code---
Context: Adsense
if [Any Condition] then [Display]
---adsense code---
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]
Preferably condition should have an opposite NOT condition.
Thanks so much for looking into this!
commented, on 14/Oct/07 at 2:56 pm # :
Jean-Paul Horn » What about the following :
Adsense:
1. Admin: display
2. Regular reader: dont display
3. Logged in: dont display
4. Any: display
Affiliate:
1. Admin: don't display
2. Regular reader: display
3. Logged in: display
thought, on 14/Oct/07 at 5:21 pm # :
Hi OZh,
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];" ?
Thanks!
thought, on 14/Oct/07 at 5:22 pm # :
P.S. Looking forward to the new version. I absolutely adore the flexibility with Who Sees Ads.
thought, on 14/Oct/07 at 6:00 pm # :
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.
replied, on 14/Oct/07 at 6:47 pm # :
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
replied, on 14/Oct/07 at 11:19 pm # :
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!
said, on 17/Apr/08 at 9:43 am # :
Hi,
Is it possiable to write a rule based on search engine search terms? For example: "if user search for "wordpress" then display".
thought, on 19/May/08 at 7:29 am # :
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:
if screen resolution is < 250, show ad 1
else show ad 2
Ad 1 250x250
Ad 2 468x60
It would be really awesome!
said, on 19/May/08 at 8:34 am # :
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:
wrote, on 16/Jul/08 at 4:05 am # :
php test for social media, or any set of domains for that matter:
replied, on 30/Aug/08 at 2:22 pm # :
I'd like to show ads to readers coming from three specific domains. How on earth do I create such a rule.
I know where to put the rule, but I don't know the syntax.
commented, on 16/Sep/08 at 10:37 am # :
Hi Ozh :)
Please bear my English, but
What would be the rule/syntax to not display ads to visitors who come to my site directly (no referers) only?
I mean, people who type directly into their browsers my URL.
Hope you can help!
Thanks in advance
Mia
replied, on 07/Oct/08 at 5:48 pm # :
I'm wondering if there are plans in the future to support auto-inserting ad code into posts?
wrote, on 07/Oct/08 at 9:33 pm # :
Aaron » Like what, exactly? Insert an ad after the jump, or after the first line break?
Could be an interesting option actually. Will think of it.
thought, on 08/Oct/08 at 1:09 am # :
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.
commented, on 09/Oct/08 at 5:13 pm # :
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 - display
If post is older than 365 days - display
If visitor is a regular reader - Don't Display
If 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.