WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wish to be able to give different ads to visitors of different "types".

For example:

  1. People from country X will get one ad, while people from country Y will get no ads.

  2. First time visitors will get an ad. Returning visitors won't.

The ad can be either google ads or something else. Any plugin or hack to do it?

share|improve this question
up vote 2 down vote accepted

There are systems that do something similar, particularly for Example 2. What Would Seth Godin Do, for example, stores a cookie in the user's browser that tracks the number of times they've visited the site. If they're a new visitor (have visited less than 5 times), it displays a message suggesting they subscribe to the site's RSS feed.

It would be a simple matter to build a similar system that displays a Google ad for first-time or new visitors but not for returning visitors.

share|improve this answer

Take a serious look at Open-X Ad Server. It requires setting up as an independent server (unless you use their service) but it has all of what you are asking for a tons more.

If you are not that ambitious take a look at OIO Publisher Ad Manager plugin for WordPress. I believe it can also handle what you are looking for (please report back if not.)

BTW, don't even consider building your own ad server. My company went down that path back in the late 90s and you would not believe how complicated the logic gets not to mention trying to ensure it is performant. If you are doing anything serious you definitely want to stand on the shoulders of giants on this one.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.