Find out how often Google Adsense shows PSA's

Intro/Summary

Webmasters running Google Adsense probably see an occasional PSA (Public Service Ad) pop up on their web sites. Ever wonder how often these show up for all surfers? Or better yet, how about automatically tracking the percentage of PSA's, even down to a per page basis? And would you like to know when Adsense "burps" (yes, it does happen) and shows all PSA's?

While Adsense has fairly detailed reporting, it provides no information in this area. But with a little bit of work, it turns out to be pretty darn easy for you to collect this data ... and the results might surprise you.

Background

First, PSA's are ads put up by Google if they don't have any contextual ones to display. You (the Adsense publisher) do not get any money for click-thru's on these - nor does the target page get anything except some exposure. It's just Google's way of trying to help out a good cause (rather than showing white space) if they don't have any relevent ads to display.

But you can specify an alternate PSA so that an image ad of your chice is displayed, and when the surfer clicks on it, they go to your URL. I happened to be interested in this because I wanted to highlight/support a charity of my own in the v7ndotcom elursrebmem SEO contest ... but you can certainly send people to a commercial page or whatever. Remember this is only done when a PSA is going to be displayed anyway, which does not generate any income at all. Ironically, I have not found any way to "force" a PSA to show up ... but after you have this in place, you'll know which pages show PSA's and how frequent.

Setup

Google tells you how to implement an Alternate Ad and I made some minor enhancements to the setup to allow easy tracking of PSA's. The domain/filenames below happen to be for mine, but customize for your site. And ditto for the image size - my example uses 728x90's leaderboards.

1. I created the following file as http://psa.watching-paint-dry.com/adsense/psa-728x90.html:

2. I then created a 728x90 image which looks as follows:

3. I added the following line to the .htaccess file in the "adsense" directory. This is really a "bonus" step that allows you to track each seperate image ad size - consider it analogous to an Adsense channel as outlined in the results section.

4. You can test all of the above by hitting the URL in step #1. You should see the image in step #2 show up, and when you click on it, get a new window as specified in the code section of step #1. Now you are ready to go live. Add the following line to your Adsense code - doesn't matter where - after the google_ad_client is as good as any. Note that it doesn't matter if you have the Adsense javascript embedded in your html or as part of an included .js file.
      google_alternate_ad_url = "http://psa.watching-paint-dry.com/adsense/psa-728x90.html"
Remember to changes the pathnames in all of the steps to make it specific to your domain, image size, etc.

Now What?

Sit back and wait ... and assuming you have set this up correctly, then check your web logs the next day. Anytime a PSA is shown, you'll see a web server log entry for the psa-728x90 html and jpg files. You should have a referrer, so you know which page on your web site they came from. And of course you have an IP and timestamp, so you can look at geolocation and/or time/date aspects of PSA's. Ditto if anyone clicks thru.

Compare to the total hits on the web page and you know the percentage of PSA's. Plus you'll be able to identify those pages that have a higher percentage of PSA's and perhaps tweak them so Google can beter determine relevence.

Oh yeah, what is the point of step #3? Every problem in computer science can be solved by another level of indirection, and that is basically all we are doing. If you have another image format (or another channel), then optionally change the filenames slightly to match that. The final landing page will be the same (assuming you want that), but you will have log data that allows you determine what page the user saw the PSA on and clicked thru from.

Results

I happened to set this up the morning of Friday, January 26th, 2006. I manually hit a dozen or so pages on my web site - even created some new ones - and never saw a PSA. I'm thinking wow, Google is pretty relevent. So when I looked at the log data for that day, I was floored that about 5% of the time, PSA's were shown - What Up?!? Turns out that Adsense has some major issues that afternoon - I happened to read this about this in SER and SEW but otherwise, I would have never known ... but with my approach, it's clearly seen. Stuff happens ... but has anyone asked Google for compensation since they weren't showing clickable ads?

The next two days, the percentage of PSA's were about 0.5% ... and about a third of those were coming from one page that I'll have to take a look at - not sure why is seems to be "stuck" displaying PSA's. But none of this I would have otherwise known. All of the above data is based on a web site getting >100,000 impressions/month, so it's semi-reasonably statistically significant - even more interesting would be a web site getting >100,000 impressions/day.

Conclusions

This turns out to be a real simple way to automatically determine how often PSA's are being displayed by Google Adsense. Outages in the ad-serving are easily seen as are problems with individual pages. BTW, I haven't analyzed it, but there is probably some be some geolocation aspects in terms of percentage of PSA's being shown. And it all runs on auto-pilot for you.