Warning: hefty explanations and documentation. On a rush? Give the demo a try. Chances are you'll understand right away what and how. Then download. Then please read here.
Current version: 2.0 for WordPress 2.5+ See below for older versions.
You most certainly have two types of visitors on your blog : some returning readers, and a majority of first time visitors. Returning readers come to your site for its content and for what you write. First time visitors, and mostly search engine visitors, come because they are looking for something particular, look at the page, and leave.
The first obvious thought that comes to mind when you want to monetize your blog is: "I'm going to put ads and banners everywhere". By doing so, you won't add any value or service to regular readers, who are not likely to click on your ads. By doing so, you'll also probably won't do justice to your finely handcrafted pixel polished WordPress theme. By not serving ads to your regular visitors, chances are you'll both lose little money and show your readers you're treating them differently.
Therefore, the second obvious thought about blog monetization is : "I wish I could display a lot of ads to those coming once never returning readers, but not bother my regular fans". Enter Who Sees Ads, the ultimate ad management plugin.
Who Sees Ads ?
So, who sees ads ? Now it's up to you.
Who Sees Ads is an advanced ad management plugin that lets you decide who will see your ads, depending on user defined conditions. The association of an ad and these conditions is called a context: a set of circumstances you define, that will eventually display or not an ad.
For instance, you could consider the following criteria: Is the visitor a regular reader? Does this visitor come from a search engine? Is the visitor currently reading a recent post, or something really old?
Live demo
The plugin is active here, to display an ad on top of the right sidebar. Depending on the context, you could see it or not. Its display rules are:
- display if visitors comes from a search engine
- don't display if the visitor is a regular reader
- always display
The ad behavior is defined by the first rule that is matched. Visit the main page of my blog: as I've defined a "Regular reader" here (someone who has read at least 2 pages over the last 10 days), you're now a regular reader, hence rule #2 apply and you don't see the ad any longer. Now go to Google and click on the first result to come back here: rule #1 now applies, and you'll see the ad.
Define Contexts
Ad code + Display rules = Context
You already probably have the Ad code : it can be plain HTML (a text link, a image banner) or Javascript (your Adsense code). Let's define the display rules.
Who Sees Ads offers a very intuitive and powerful visual interface to create your context and pick display rules, in which you naturally select and order them with your mouse. The interface also offers a convenient way to duplicate, rename and delete your contexts.
Have a look and play a bit with this demo. You'll love it.
Display Rules
By default, you can pick or mix any of the following rules :
- If Visitor comes from a search engine, display / don't display
- If Visitor is a regular reader, display / don't display
- If Post is older than XX days, display / don't display
- If Visitor is logged in, display / don't display
- If Date is between specified date interval, display / don't display
- If Ad has been showed less than XX times, display / don't display
- If This visitor has viewed this ad less than XX times, display / don't display
- If All previous conditions fail, try another context
- If Any condition, display / don't display
The ad behavior will be eventually decided by the first rule which is matched. For instance, if you want to display an ad only for search engine visitors, you'll pick the following :
- If Visitor comes from a search engine, display
- If Any condition, don't display
If no rule is matched, nothing displays, so the second rule in the above example is actually optional.
I made up a list of example display rules, be sure to check them.
Advanced Display Rules
You can use PHP functions and make your own custom advanced display rules. Want to display something on home page only ? if (is_home()) display will be your custom display rule.
You can use PHP built-in, WordPress internal, or your own functions. Your brain is the limit.
Please note: you obviously need to know a bit of PHP in order to use the advanced display rules. By default, they are not enabled. If you want them active, edit the beginning of the script and set $wp_ozh_wsa['iknowphp'] to true. This requires your agreement on being on your own if you break your site or if ads don't show as expected.
There are two advanced custom display rules :
- If ( condition ), display / don't display
- If !( condition ), display / don't display
The if and if not rules are working the same, I just thought it could be more convenient in some cases to use an if not rather than an if, and this way you also have two custom rules for the price of one :)
Again, check the example display rules to get an idea of how powerful it is.
Features
Simple and Effective Ad Management
Even if you're not using Who Sees Ads to fine tune display rules, it will make your life easier. Pasting <?php wp_ozh_wsa('google-336-280') ?> in your PHP templates such as sidebar.php is a lot easier than cut and pasting 10 lines of javascript, especially if you decide later to change the javascript across multiple files.
Use it inline or in PHP templates
Create contexts and display ads either in your PHP files on within your posts and pages :
- <?php wp_ozh_wsa('mybanner') ?> in your PHP files such as sidebar.php
- <!--wsa:mybanner--> within posts and pages
Visual interface
If you haven't tried it already, play with the demo. It's not functional of course, but it will show you own the interface lets you visually create contexts, and easily rename, duplicate and delete ads.
Help Wizard
A togglable introductory help contains a handy wizard that will assist you, creating your two first rules. Click on the image for a screenshot of the Wizardry.
Posting help
Within the Post/Edit interface, you'll find a convenient drop down selection to easily insert context you will have created (if you create just one context, the select is replaced with a button)
Google Adsense and Yahoo Publisher Compliant
Per terms of use, YPN (TOS) and Adsense (TOS) impose a maximum number of ads in a page, as follow (as of writing):
- YPN: 3 ads per page
- Adsense :
- 3 ads
- 2 search boxes
- 3 link units
- 3 referral units
Who Sees Ads fully complies to these restriction, and will display ads of a particular type up to the maximum number allowed.
Google Adsense and Yahoo Publisher Compliant, part 2
Per terms of use, YPN and Adsense don't allow ads on error pages such as 404 pages, and on pages that are not viewable by their system.
Who Sees Ads also complies to this policy, and ads won't be displayed on 404 error pages, and on draft posts a publisher is previewing.
Admin Clicks Safety
Admin Click Safety is an option that will prevent you from accidentally clicking on your own ads (Adsense or Yahoo Publisher), replacing them by a placeholder when viewed by the blog admin.
Regular visitors, of course, will see actual ads if applicable. Days of "oops I clicked it!" are over.
Widget support
Who Sees Ads is now supporting widgetized themes for easier ad management.
Custom Preferences Hacking
Advanced users with some PHP editing knowledge can now define a custom set of preferences or behaviors that will override Who Sees Ads' defaults. The plugin comes with an example my_options_sample.php file. Rename it my_options.php, edit it, and never lose any change you'd make when you upgrade the plugin.
3rd party plugin compatibility: Adsense Deluxe and Adsense Manager
For those who are already using Adsense Deluxe or Adsense Manager to manage your Adsense ads, you can seamlessly make the transition to Who Sees Ads and give it a try without uninstalling them. Instead of pasting the actual Adsense code when you create a context, just enter something like the following examples, depending on what plugin you're using:
- <!--adsense#mybanner-->
- adsensem_ad('mybanner')
- adsense_deluxe_ads('mybanner')
Please note: compatibility with these 2 plugins has been implemented to allow easy testing before adopting. I personally find Who Sees Ads much more powerful and efficient, and don't see the point of using it side by side with another ad management plugin. I will not continue support of these plugins if their code evolves and changes so that it breaks with my plugin.
Rotating Ads
You can define only 1 context and assign it as much ad code as you want. You just need to specify your custom code separator in my_options.php and you're done. Example, defining the string *** CODE *** as a separator:
- <img src="banner1.jpg" alt="Banner 1" />
- *** CODE ***
- <img src="banner2.jpg" alt="Banner 2" />
- *** CODE ***
- <img src="banner3.jpg" alt="Banner 3" />
Completely dynamic
The content managed by Who Sees Ads and whether it should display or not is processed dynamically on every visit for every visitor, to ensure maximum efficiency and make sure each visitor receives the treatment it deserves. The drawback of this aspect is that the plugin is not compatible with cache plugins, which generate each page once and serve the same static file to each subsequent visitors.
Download
ozh-who-sees-ads.zip
Extract and upload to your blog, preserving directory structure if any.
Note: download counter here and stats on wordpress.org may differ and reflect the number of downloads before this plugin was hosted on the plugin directory
PHP Template usage
The regular PHP call you will insert in your PHP templates is the following:
- <?php wp_ozh_wsa('myad'); ?>
However, you can pass an additional parameter to turn off output and have the ad code returned instead:
- <?php $code = wp_ozh_wsa('myad', false); ?>
By default, the plugin returns an HTML comment when no ad has to be displayed, for instance:
- <!-- WSA: rules for context 'myad' did not apply -->
A complete example of how to use WSA with your own functions would be something like:
- <?php
- $code = wp_ozh_wsa('myad', false);
- if (strpos($code,'<!-- WSA') !== false) {
- // plugin returned actual code, do something with it
- ...
- } else {
- // plugin returned no code to be displayed
- }
- ?>
Examples and advanced use
The obvious usage of this plugin is to display ads with rules as :
- Display ad when user comes from a search engine
- Don't display ads to my regular readers
- Display ads on old stuff, don't display on fresh posts
But you can also :
Greet your returning visitors
You can display ads, or really anything. For instance, display something only to your regular readers: a "welcome back" message, or a special offer you don't want them to miss.
Geo target !
In conjunction with my own IP to Nation plugin, you can easily target visitor from a particular country. For instance, you've always wanted to display Yahoo Publisher ads to American visitors only, as Yahoo suggestscompells? Easy, your context simply has to use the following custom if rule:
if (wp_ozh_getCountryName(0) == 'United States'), display
Check the example display rules for more ideas of usage.
Older version
Download: Who Sees Ads 1.3.3 for WordPress 2.3.3-
Question?
If you have a question, read all the comments: the answer *is* there.
Shorter URL
Want to share or tweet this page? Please use this short URL: http://ozh.in/kr
Matt » Not sure what you mean. If you mean "alternate ads instead of PSA ads when Adsense doesn't know what to show", then it's on the client side, within Adsense's javascript. Nothing a server side plugin can do.
If you mean "alternate ads when Who Sees Ads' display rules decide that an ad must not show", well, that's exactly what the plugin is for…
Hey Ozh, thanks for the reply. I guess I made things more complicated than they were. I assumed that we needed to code our own if then statements. So everything working perfectly now, thanks.
I'm wanting to display an ad on the home page only but I have wordpress set to use a static page as the home page. In this case WSA is not recognising the static page as the home page and consequently the ad is not displayed.
Is there a way around this?
Is there a way to display ads on specific pages only?
Thanks for a great plugin…
No worries, I worked it out ..
I used the conditional: is_front_page()
[…] Who Sees Ads – Makes ads or other elements conditionally displayed […]
[…] the All-in-One SEO or Platinum SEO plugins with this theme. You may also want to consider the Who Sees Ads plugin to help you control when ads […]
With the counter on Ad viewed/Ad displayed, does this count spiders or just human traffic?
i also get that
Warning: Invalid argument supplied for foreach() in /home/www/doc/9402/…/www/wp-content/plugins/ozh-who-sees-ads/wp_ozh_whoseesads_admin.php on line 1393
plus the Possible Rules dont move into Active Rules plus context ?Qs dont pop up – while all is fine local on 2.7
I think the foreach() problem had been stated here before, but went unanswered.
regrds,
oliver
Os. » Never been able to replicate the foreach bug. As for the interface problem (rules not moving) it's probably a conflicting and badly coded plugin.
[…] the lights on. But I don't force ads on everyone all the time – I use Ozh' excellent Who Sees Ads plugin for WordPress so only search engine visitors see my banners. And I will never pollute my […]
[…] Dynamic visitor targeting: This includes things like showing different content depending on who your visitor is. Some plugins that do this are What Would Seth Godin Do and Who Sees Ads. […]
[…] Ozh' Who Sees Ads Werbung nur für bestimmte Besucher anzeigen lassen. […]
[…] veidošanai izmantojam WordPress, tad risin?jums ir vienk?ršs un pavisam bez maksas – spraudnis Who Sees Ads. Vienk?rši lietojams spraudnis, kuru var izmantot ne tikai, lai vad?tu rekl?mas bloku […]
clever, I get it, I like the rules approach.
One question is there any way to get the "Ad Code" box to be scalable, or to set it in the PHP to be 60 lines tall or something like that. Right now it's barely 4 lines of code and I can't see everything. I could copy+paste from another editor but I prefer to avoid that if necessary. Otherwise yes very clever ad plugin.
nick » Hint: https://addons.mozilla.org/en-US/firefox/addon/3818 :)
Thanks for the plugin Ozh anyone could have thought of the idea of selective display of ads.. but the implementation is just flawless. Couldn't have asked for better..
Just one question, is there a way to edit the existing context's or are you planning to add this feature in the upcoming releases?
Syed Abbas: Hmm? Of course you can edit existing context. Just select them in the dropdown.
[…] modifiche.COME PRESENTARE GLI ANNUNCI SOLTANTO AI VISITATORI PROVENIENTI DAI MOTORI DI RICERCA?1 – Plugin Who Sees AdsQuesto plugin è molto interessante, una volta ch permette di presentare gli annunci Adsense […]
[…] based on defined criteria. I will discuss one such plugin called “Who Sees Ads” (click here to download) in this article which I think is the BEST among similar plugins and cannot get any […]
[…] Ozh' Who Sees Ads: Mon plugin coup de coeur de l'année 2008. Il vous permet de choisir à qui vous voulez montrer vos publicités AdSense. Pour quoi faire, demandez-vous? Simple: vos lecteurs réguliers sont habitués de voir vos publicités et auront moins tendance à cliquer dessus que vos lecteurs occasionnels ou ceux qui ont découvert votre site grâce un engin de recherche. La conséquence est que votre ration CTR diminue, ce qui nuit à vos profits! Grâce à ce plugin, vous pouvez décider de montrer les publicités uniquement aux visiteurs qui ont vu moins de X pages depuis Y jours ou à ceux qui viennent de Google. Je gagne environ 20$/mois facilement grâce à ce plugin. Possiblement un peu plus lourd que les autres, mais il vaut chaque milliseconde supplémentaire! […]
Ozh, what have you found to be the best settings for this plugin? For example, how do you recommend we classify regular readers? As i see on this website i have to view quite a few pages before the ads disappear which is different to the 2 page limit you suggest in the documentation on this page. Have you changed your mind about how regular readers should be classified?
just wanted to return to this page via google again, and now i see all ads again. A bit confused, as i thought this plugin was designed to stop returning visitors seeing ads?
[…] Plugin habe ich das so geregelt, dass alle, die im Laufe der letzten 10 Tage mehr als zwei Seiten […]
Jenny: you can configure WSA as you wish. My settings mix "returning visitor" with the age of the post.
[…] 2009: Who Sees Ads? — This plugin will let you display ads to only search engine traffic. This is really simple […]
How would i turn off any ads for just one individual post? Is there some code I can add directly into the post?
[…] Ozh’ Who Sees Ads — ???? ??? ??????????? ????????? ???????????? ???????? ?????? ????? ????????? — ?? ???? ?? ?????? ??????? ????? ????????????? ?????????? ?????? ????????? ????????? , ? ???? ???. […]
[…] Ozh’ Who Sees Ads – Allows you to set several options for when an add gets displayed. Some of the most interesting ones are if the reader comes from a search engine, was published between certain dates, is older than X number of days and more. […]
Hello,
a great plugin, but when you hae too many content (I have 17), the 18th will not be saved and will be clear after save.
Paul
[…] Ozh' Who Sees Ads: Mon plugin coup de coeur de l'année 2008. Il vous permet de choisir à qui vous voulez montrer vos publicités AdSense. Pour quoi faire, demandez-vous? Simple: vos lecteurs réguliers sont habitués de voir vos publicités et auront moins tendance à cliquer dessus que vos lecteurs occasionnels ou ceux qui ont découvert votre site grâce un engin de recherche. La conséquence est que votre ration CTR diminue, ce qui nuit à vos profits! Grâce à ce plugin, vous pouvez décider de montrer les publicités uniquement aux visiteurs qui ont vu moins de X pages depuis Y jours ou à ceux qui viennent de Google. Je gagne environ 20$/mois facilement grâce à ce plugin. Possiblement un peu plus lourd que les autres, mais il vaut chaque milliseconde supplémentaire! […]
hey everyone,
great plugin – I only have one recommendation, if you choose to show google ads only to search traffic – those people typically visit another page, but then the adds never show again, they only show on the landing page….. any way to change that so it shows throughout the users entire stay?
thanks.
John » If those people typically visit another page, why treat them as you treat those who leave on first page? They are obviously interested in your content, not your ads.
[…] kay?tl? kullan?c?ysa reklam gösterme gibi ko?ullar belirlenebiliyor. Eklenti detaylar?na buradan bak?p […]
[…] http://planetozh.com/blog/my-projects/wordpress-plugin-who-sees-ads-control-adsense-display/ Mr. Ozh is providing a plugin to help you to control adsense display smart by different conditions, the detail please visit the link above. […]
I just installed the plugin and love it all ready! It will display adsense ads to those who come from search engines and no one else.This has caused my ads to be more targeted than before when I didn´t use the plugin.Hopefully the cost of a click will go up :)
[…] show some Adsense to regular readers, but I focus my energy on the visitors from search engines – this plugin makes this very […]
Thanks for this plugin, works without problems.
[…] Ozh’ Who Sees Ads – Who Sees Ads??Wordperss????????????. ????????????????, ???????????, ????????. ???? […]
[…] Who Sees Ads – ????????? ?????? ??????? ?????? ??????? ??? ?????? ???????? […]
[…] Who See Ads […]
[…] can get more information about the plugin from the home page of the […]
Awesome plugin ozh, I just wrote a review about it here – http://mwolk.com/blog/control-who-your-sees-your-adsense-ads/
I have used the plugin on live site so I may be wrong but I hope the plugin don't treat search engine spiders differently!
Hi,
thanks for creating this plugin, I'm testing it out again.
Something I have not been able to use is the option:
(in posts), for some reason it does not show the Ad (it only displays a white space ~ which makes me think it creates the space for the ad). The php in the template works fine, as well as the PHP within a post (I installed a plugin for running PHP from within posts).
I was wondering whether you have any hints on why option is not be working?
Thanks
Héctor
Héctor » Sorry, no idea…
Ozh,
no problem, if I get it to work, I'll let you know.
Thx
Héctor
Thanks a lot for this plugin. It's been working great so far and I'm starting to use it for a whole lot more than just ads in some of my sites.
If you get clever with rules, you can even "walk people" through your site, or a specific area of your site. Its a very versatile plugin, I think it can replace things like WWSGD, or some of the other plugins that react to visitor-types or referred-visitors. I'm testing some non-standard uses for this.
Thanks again!
Sorry for the quick-fire post, but I do have a question I can't seem to find an answer.
Is there known or tried way to integrate this with something like Role Scoper? RS has groups which you can use to restrict access to certain content based on predefined permission settings.
If anyone knows how to do something like this I would greatly appreciate any help, or tip or nudge in the right direction.
In plain English, I want to make a rule that does roughly this:
"if visitor is part of A-Given-Role-scoper-group, then display, else don't"
@Héctor
I noticed the same thing happening to me in a few places on one of my sites. One of the problems was that something was caching my "status" of visitor or not… so I cleared the caches on my browser and to test I disabled any caching plugins on the site, and logged out
Another reason I saw this –I think. Is that the Ad service I was using didn't actually have an ad or even a placeholder to show yet. After a little bit of time it started showing up.
Maybe you're experiencing one of those things? Is the plugin you're talking about php-exec? I was planning on using it for something related but haven't yet.
Hey Oscar,
thanks for the feedback, what you say makes sense to me. I've not tested it yet.
As per the plugin, yes I'm using: Exec-PHP it seems to work fine.
Take care
Héctor
[…] Ozh' Who Sees Ads (Plugin Homepage) […]