Archive for the ‘AdSense’ Category

AdSense tip: how to randomize ads between 2 positions

Wednesday, August 30th, 2006

Some time ago, I wrote about a way to randomize ads; that is, in a particular position, show one of a number of different ads. With AdSense channels, you can use it to find out which ads (formats, colors, etc.) work better in a particular position.

But now I’m going to take you one step further. :)

What about randomizing between two positions? Say you want to see if an ad works better on the top or on the bottom of a page. How to show one, and only one of them?

Making the first ad show 50% of the time is easy. The problem, here, is that the second ad must have a way to tell whether the first ad was shown or not.

There are, of course, several ways, most of which using some kind of variable to store if the first ad appeared or not. But I think that there’s a better method, which has the advantage of being incredibly simple, and doesn’t require you to store anything.

It’s simple: use the clock.

If the current hour is even, you show one of the ads. If it’s odd, you show the other. Each of them “knows” whether it should appear or not, according to the current time.

Sounds complicated? It isn’t. For instance, using PHP, in the first position you put:

function isodd($number) { return($number & 1); }
$x = date('G');
if (isodd($x)) include "adsense-top.php";

And in the second position:

function isodd($number) { return($number & 1); }
$x = date('G');
if (!isodd($x)) include "adsense-bottom.php";

The “adsense-top.php” and “adsense-bottom.php” files can be mere AdSense code, or can branch itself further, using something like my original tip.

By the way, I use hours instead of minutes (which would provide better granularity) because I want to avoid, as much as possible, the small possibility of the hour changing in the miliseconds between the two scripts. Using the hour value, it should virtually never happen (never happened to me, so far), though it wouldn’t be the end of the world anyway.

AdSense tip: NEVER ask your readers to click on ads!

Monday, August 7th, 2006

Some time ago, in more “dubious” sites (porn, cracks, etc.), you’d usually see ads (usually for porn) and, near them, messages telling people to “click here to support the site”, and variants of that.

These days, such messages aren’t so common, especially in more “legitimate” sites, where AdSense is allowed. In fact, those are against the AdSense terms of service, and, so, people who attempt to use them are eventually banned from the service.

Still, there are still people who ask, using other methods, to click on ads: by mail (e.g. mailing lists), or by asking friends.

However, if you don’t want to lose AdSense forever (including any money you have already accumulated), don’t do it!

Why? Because, if I were Google, and I wanted to battle click fraud, I’d easily find a way to fight those two methods of “artificial clicks”. Now, if I can do it, it stands to reason that they can do it much better, right?

In the “mail to a site or forum’s readers asking them to click on ads once or twice a day” case, what would it cause? Some tens or hundreds of particular users clicking on ads in the same site, regularly. That would, of course,create an easily detectable pattern, which they’d be able to detect with a simple script.

Asking friends to click, on the other hand, will often make them think “I’ll click a bunch of times, to help the guy.” An user clicking 20 times, in a couple of seconds, on ads on the same site? I think they can certainly detect that. I would.

In fact, in the past, I’ve had to ask friends not to do that anymore, because, trying to help me, they were doing it on their own initiative… and I, myself, detected it on the AdSense stats. Fortunately, the “guilty parties” told me about it (after all, they were trying to help), and I was able to ask them to stop.

In short: non-natural ad clicks are relatively easy to detect. Never ask anyone to do them, or you risk saying goodbye to AdSense for good.

AdSense trouble: referer spam, traffic exchange and autosurf programs

Tuesday, August 1st, 2006

So, what was the trouble I mentioned yesterday, which made Google warn me by email?

Apparently, there are some programs for generating traffic and/or clicks artificially, which Google doesn’t like, of course.

This appears to be related to referer spam, which sends a lot of hits with fake referers (such as casino sites), because many people and sites have public statistics, which may mean improved PageRank for the spammer’s site. If they spam thousands of sites this way… it can really make a huge difference.

This new case, however, doesn’t appear to be “true” referer spam, but traffic exchangers or autosurf programs.

For instance, last month the top referers for this blog were:

bad referers

That’s an image, of course. I would never link to such sites. :)
Note, by the way, how close the numbers are… can you say “automated”? :)

I have just blocked those, and others (go here for some tips on doing so with Apache).

It’s quite likely that blog exchangers are considered “bad”, too. And if Google is cracking down on such services, it may be a good time to stop using them (and to edit that part of the series). Most poeople really use them just to surf for credits, though I have been lucky to discover a couple of very interesting blogs, which I read to this day, there.

Some AdSense trouble, and some Roger Waters too…

Monday, July 31st, 2006

I’m too tired to do it right now, but tomorrow I’ll have to block a bunch of “bad” referrers, which have earned me a nice warning email from Google’s AdSense department. Googling around, I see I’m not the only one. More details tomorrow… but, meanwhile, one suggestion: check your logs, especially your top referrers. If they’re suspicious, it may be a good idea to start blocking them.

This is related to referrer spam, but it’s apparently something much worse – it can cause your AdSense account to be closed. As I said, more to come.

Meanwhile, WordPress 2.0.4 is out.

And I’ve just bought Roger Waters’ Ça Ira. Yup, it’s opera. Real opera, not a metal opera like Avantasia. Something to listen to, tomorrow.

AdSense curiosities

Tuesday, March 28th, 2006

It’s interesting to observe how well the “contextual” part of AdSense works.

For instance, for my mini-site for yesterday, Chess: basic principles, it’s working very well. Most ads are about chess, chess sets, or board games. I’m pretty impressed by this one.

However, it fails completely for the Portuguese version of the above, Princípios básicos de Xadrez. The ads are in Portuguese, and mostly related to games – cell phone games, soccer games and so on. There isn’t a single ad about chess or board games.

Why is that? The content is exactly the same, only in a different language. Even the meta tags are correct. I believe that, in this case, it isn’t Google’s fault; it’s just that there is nobody in Portugal using AdWords to advertise something related to chess. In this way, I sadly have to admit, we’re a more primitive country: soccer rules here. :( But I digress.

Another one that isn’t working is today’s mini-site, Zombie Types. This one’s in English, so there should be something out there (horror movies, horror games, etc.)… but the ads I’m getting, even after half a day, are “public service” ads – the kind they use when they can’t find keywords in the site. And these don’t pay.

This can happen, sometimes, when you put the AdSense code before there’s any content in the site, because it can take some time for "Mediapartners-Google/2.1" (the AdSense bot) to come back to the page, so it’s the page’s initial version that counts. But that was not the case here; the AdSense code was the last thing to be added. Oh well… it should be fine in a week or two.

Eric Giguere: the Single Page AdSense Site

Monday, March 6th, 2006

Eric has an intriguing post called The Single Page AdSense Site. It’s, in a way, an even simpler variant of Making Money with Niche Websites, and it’s something I’d be doing in spades if I wasn’t such a lazy guy. :)

Inside AdSense: changing channels

Friday, March 3rd, 2006

No, I’m not implying that they read this blog. :) But their newest article, “Channels are made for changing“, reads a lot like part 23 of the Blogging Tips series: “Change your ads“. ;)

You can even go a bit further, and randomize your ads, and then use channels to see what variations work better. Not to mention being unpredictable, and working through people’s “mental filters”.

AdSense: is anyone targeting your site?

Friday, March 3rd, 2006

Inside AdSense, the official AdSense blog, has a post called “Advanced site targeting and referrals reporting“, which explains how to see whether any advertisers are targeting your site. Using channels, you can also see which sites.

Apparently two of my blogs have targeted ads: The Tlog and, a bit surprisingly, Cool Stuff.

I also use AdWords to promote some of my sites (just some pocket exchange per day, though), and I may try out targeting some sites for my own ads, soon. Maybe some popular Portuguese or Brazilian blogs, for A Arte de Blogar, for instance.

More on randomizing ads

Thursday, February 9th, 2006

“I believe in coincidence. Coincidences happen every day. But I don’t trust coincidences.” – Garak, “Star Trek – Deep Space 9″

Just a couple of days after my randomizing ads tip, Darren Rowse mentions a WordPress plugin to do exactly that. Funny how the universe works. :)

The plugin may be useful to some. However, I find my method much simpler and quicker – the plugin has 4 pages of instructions! I’m not saying it’s badly made, mind you. But, to me, the point of a WordPress plugin is to make things simpler, to prevent one from having to do things manually. Yet, I don’t think the plugin actually saves work or time, or is easier to use for non-technical users.

Looking at it was useful in a way, though: just like that plugin, “my” method also works for anything made in PHP – not just WordPress -, and isn’t limited to AdSense ads – indeed, it’s not limited to ads at all. You can use it to rotate between any kind of content – Chitika ads, static images, static text, a blogroll, whatever.

AdSense tip: randomizing ads

Tuesday, February 7th, 2006

No, this isn’t my “brilliant idea” – Chris Garrett of Performancing mentioned it first. But, while he gives a PHP example on how to get a simple random number, I’ll go a bit further…

The idea, as Chris says, is to randomize a particular AdSense ad (changing formats, colors, etc.), and have different channels for each version. Doing it, you can easily learn what works best, and what doesn’t, instead of having to wait for a couple of days while you test each format. This also allows you to focus on a single change – one ad – without being affected by other factors, such as the time, the day of the week, and so on – as at any day, any time, every single ad version has a chance of appearing.

This is just an example in PHP, which works for WordPress blogs, for instance. There are, of course, many other ways of doing this.

1- pick a particular ad. Replace that ad’s AdSense code with <?php include 'adsense-ad.php'; ?>.

2- on the WordPress directory for the theme you’re using, create a file adsense-ad.php with the following:

<?php
  $i = rand (1,8);
  $script = "adsense-ad" . $i . ".php";
  include $script;
?>

Replace the “8″ with the number of ad versions you’re going to test.

3- go to the AdSense options, and generate code for the first version of the ad. Remember to set a unique channel. Save it as another file, in the same directory, named adsense-ad1.php (note the “1″, it’s not the same file as before – that one had no number).

4- repeat the previous step for the other ad versions (changing the channel, and the digit in the file name).

Easy, wasn’t it? :)


Creative Commons Attribution-NonCommercial-NoDerivs 2.5 Portugal
This work by Pedro Timóteo is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 2.5 Portugal.