planetOzh, Who Sees Ads ? Manage your Ads, Control Who Sees Them,

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.

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 :)

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:

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:

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

Download the plugin :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:

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

Older version

Who Sees Ads is still available (yet not maintained any more) for WordPress 2.3.3 and earlier. Note that I strongly recommend always running the latest version of WordPress.
Download: Who Sees Ads 1.3.3 for WordPress 2.3.3-

826 Blablas

Hi I have a few blogs and on all of them I have “who see ads”. On this new blog I’m building I would like to us all the contexts I already made on some other blog. I already try to copy and paste them from one MySQL database to the other but even as it appears on the second one database, it does not appear on the “who see ads” Context setting page.
How can I achieve exporting and importing it correctly?

ronny » first, you'll need to install & activate the plugin on the other blog. Then, using phpMyAdmin or a similar tool, in the option table (wp_options probably) locate the entry named "ozh_wsa" and copy its content in the other blog's wp_option.ozh_wsa

I have a Problem with your "Google Adsense and Yahoo Publisher Compliant" Feature. I use A/B Testing for some Adsense Ads (like described here: adsense.blogspot.de/2006/08/abcs-of-ab-testing.html). I only show 3 Ads per page at the same time, but have more then 3 Ad Units as part in my JS. Looks like the WSA Feature gets triggered by this and dont shows the related Ad Block.

Could you please fix this? (I do A/B testing quite often). I would use Rotating Ads Feature of WSA, but I do use caching my site and need to Rotate it with JS like described to work correct with caching.

And BTW. "PHP Template usage" Code on this page seems broken. Looks like you removed a Plugin for the shortcodes. ;)

hi can you plz tell me how to add your plugin to my wordpress blog.because i cannot see the search bar on the post page on my dashboard.and nothing happens when i place the top and bottom ad link on my post.???
plz reply.

I love your plugin and it still works fine with WordPress 4. Unfortunately I'm using the new async Google adsense code. This is not recognized correctly and the Admin click safety is not working. Can you please release a quick update I think the problem should be fixed in a few minutes.
Perhaps this can help you:

thanks for the reply. i am not a tech person so any step by step instructions to troubleshoot his issue that you can provide would be greatly appreciated. I do have other plug ins installed, contact form 7, slick social share buttons and the social links. would any of these be causing the problem?

Hi Ozh – I'm having the same problem at Madeline and Gabrielle. The install went fine but I do not see the button on the text screen for both existing or new posts. I'm not receiving any other error messages on my site either so I'm kind of at a loss. Any suggestions? Thanks in advance.

Is "Who see ads" able to handle ad rotations and visitor conditions even with cached sites using plugins like W3TC or WP Supercache? And is there a solution for responive ads like other ad managers, e.g. Advanced Ads 8https://wordpress.org/plugins/advanced-ads) provide?

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 / June / 28 (10 years 8 months 3 weeks and 6 days ago)
Last updated: 2010 / October / 26 (7 years 4 months 3 weeks and 5 days ago)