Donncha's Friday Links

There is no vulnerability in WP Super Cache. Chris blogged about it after we spent a late night of debugging it until 1.30am. But if:

  • You are using Windows (props Computer Guru)
  • You are using a Red Hat or Cent OS system, or just having problems with compressed content (props Dennis)
  • You want to use the reject uri function
  • You want to try out the new automatic .htaccess rule generator
  • You want WordPress searches to work again

then you should head to the download page and try the development version of the plugin. Official release tomorrow probably.

I tell ya, I have learned more about Apache, content types, mod_rewrite, IIS and Red Hat vs Debian differences with this project than I ever could have considered healthy.

  • Joseph linked to How to Debug PHP with Vim and XDebug on Linux. I started reading but then I realised I had to compile Vim again! I’ll stick with my error_log(). Inertia is a bitch isn’t it?
  • Haha. Hugh responds to requests for a Facebook cartoon. (via Damien)
  • Google is abusing nofollow? Credit where credit is due. That’s just mean.
  • Akismet announces Defensio. So, who’ll hack both their plugins to compare results? Should be easy. Should be interesting! Chris is comparing the two on different blogs. Excellent.
  • The WordPress MU Codex is going to get another boost when we start populating it with useful nuggets of information from the forum. More documentation, more help, less frustration.
  • OK, so how many Irish and UK natives sneer, sniff and give out about the Polish people living here and in the UK? This is what happened to Joe who broke his ankle in Poland. Wouldn’t you just love if your hospital was that good?

    He arrived in the hospital at 10:15am, He was wheeled into the doctor at 10:30am and then taken for an X-Ray. By 11am it was confirmed that his ankle was broken and it was reset. By 11:15am his ankle had been placed in a cast and by 11:30am he was back in his hotel eating his lunch. 1 hour 15 minutes, done and dusted.

  • Stephen Fry bemoans the advent of modern cameras and mobile phones. Gone are the days of the simple autograph.
  • IPhone Day in the UK today! Fanboys started queueing For the iPhone release in the UK, yesterday. Unfortunately for them they have to deal with British weather. Whycantheywaitafewdays…
  • Googlehacks is a neat front end to Google allowing you to find music, books, videos and other things online. via and Digg so you all probably saw this too 🙂

How many visitors come from Google?

I use Google Analytics to track visitor numbers to my site as well as a custom written referrers package some of the early users of WordPress.com may remember. That only records 7 days of data because of the data size so when I wanted to know how many visitors come from Google to my blog I went looking at Analytics.

Google visitors in October

To do the same on your site, open Google Analytics and select your site. Click on “Traffic Sources”, then look at the list of top sources. Chances are Google will be near the top of that list. Click on that link and you’ll see a graph like the one above. Done!

Life after Text Link Ads

Hi, my name is Donncha and I used to have text-link-ads on my blog. They’re gone now but only after Google slapped me into submission and reduced my page rank to 4. Initially I felt angry and shocked that this happened but I have no excuse, I heard it from the horses mouth, I knew it was coming. I was one of those evil unscrupulous demons who manipulated the pagerank of other sites for money. My guilty conscience is somewhat alleviated by the fact that I refused to show a text link ad for a Viagra spammer yesterday morning. Oh well.
Google’s own advertising, Adsense, is still running here, as is Kontera, (leave a comment and you’ll never see them, isn’t that nice?) and the competitive ad filter advice I gave out a few days ago really makes a difference to your bottom line. Just ask Justin!

What’s in store for the future? Keep an eye on this blog. WordPress MU 1.3 is coming real soon now. There are going to be lots more free and GPLed WordPress plugins, including a pretty cool digg proof cache that also works in WordPress MU. Think of it as WP-Cache on afterburner! A couple of sites are already testing it with positive results. I’m watching the access_log roll by on a server as a digg is happening now. Load average is hovering around 1 and the page loads quickly. Sweet.

Why you need the Adsense Competitive Ad Filter

While it didn’t invent search-triggered ads, Google figured out a far more efficient way of turning web-users into buyers. Rather than doling out premium space to the highest bidder, as its competitors did, Google used another algorithm to work out how relevant the ad text was to a given query and the odds someone would actually click on it. This meant ads were targeted at the users most likely to respond to them. The result was that Google’s ‘click through’ rate (the number of times users click on ads) was twice as high as its nearest competitor’s.

(Sunday Times)

You signed up for Google Adsense, verified your home address, typed in the secret code they sent you and now you have adverts on your website. Are you earning the most you can from them? Probably not. Read the quote above again. I’ll wait.

Done? Many advertisers already know this and exploit how Google pick their adverts so their low-paid adverts show in preference to higher paid ads. A whole industry has sprung up around this to create “Made For Adsense” or MFA sites. MFA sites make money because the link clicked to get to them costs them less than the money they make from the adverts your visitors click on their sites. Google took action earlier in the year and disabled many MFA accounts but it’s easy enough to get an Adsense account and they’re coming back. Here are the Alexa graphs for a couple of MFA sites who were stopped in their tracks in June:

megasearchinginfo.png
1helponinfo.png

And here’s an inappropriate site I don’t want advertising on my site.

10-topcom.png

Unfortunately despite the culling of MFA sites in June there are still plenty of low-paid adverts in the Adsense inventory. That’s where the Competitive Ad Filter comes in useful. At least once a week, or maybe more often I browse through the most popular posts on my sites looking at the adverts. If a URL looks particularly suspect I manually type it into a new browser window (don’t ever click on your own ads!). If the page that loads looks like an MFA site it gets added to my ad filter.

Criteria for MFA Sites:

  • Content free. The site will have very little content, or the content will be ripped from elsewhere. Sometimes this is easy to pick up on.
  • Lots of adverts compared to content.
  • Directory site. The front page is a list of unrelated subjects.
  • Front page lists link directly to product affiliate links.

Basically, spammy behaviour.

How do I know if cheap adverts are being served? Log in to Adsense and check the “Page eCPM” column on the Reports Overview page. Is it lower than $5? You could probably do much better! eCPM stands for “Effective Cost Per Thousand Impressions”. From the Adsense help page:

From a publisher’s perspective, the effective cost-per-thousand impressions (eCPM) is a useful way to compare revenue across different channels and advertising programmes. It is calculated by dividing total earnings by the number of impressions in thousands. For example, if a publisher earned $180 from 45,000 impressions, the eCPM would equal $180/45 or $4.00. However, please keep in mind that eCPM is a reporting feature that does not represent the actual amount paid to a publisher.

I document changes to my Competitive ad filter on notspam.org. The sites listed in those posts suit my sites, but if you don’t use the ad filter in Adsense it’s a good starting point. Hopefully you can increase the eCPM of your Adsense account above US$5 with only a few small changes.

Friends don't let friends see adverts

This post has been a long time in the writing. Ever since I started advertising on my blogs my strategies have been tweaked continuously so consider this post a snapshot description of what I’m doing with Adsense advertising now. This is a long post, but read through it. The plugin I use to do most of this stuff is linked near the end.

Last year at the IT@Cork Web 2.0 conference, Gavin mentioned that he earns enough off his blogs to pay for his hosting, and I thought to myself that it would be handy to have an extra bit of cash to do likewise. I didn’t do anything about it until July when I signed up for an Adsense account and put some ads on the site. Things were slow that month but they’ve steadily improved to the point that it’s a reasonable second income now.

At last year’s WordCamp in San Francisco, one of the talks was about monetizing your blog. It was a fascinating talk with a great discussion afterwards and I brought home some good ideas:

  • Don’t show adverts to your friends. They are the people who visit your blog and leave comments. They’re not going to click the ads anyway.
  • Position matters. Right underneath the post title and above the content is the best place on a blog to put an advert. (Thanks Matt!)
  • Go as wide as you can.
  • Experiment with ad colours, borders and sizes. Don’t accept the Google defaults. Blend your ads or make them stick out. It all depends on your blog.

Since then I’ve developed my ad serving strategies further:

  • I love when people comment, and I’m honoured when people subscribe to my blog. Therefore I won’t show my RSS or email readers adverts. If you like what I do enough to subscribe I won’t burden you with advertising. You’re my friend.
  • Don’t show adverts on the homepage.
  • Adsense Injection is great for putting adverts directly into posts.
  • Monetize your archive. Any post older than a month gets adverts.
  • Don’t show adverts to Digg, Delicious and Stumbleupon visitors.
  • Identify where most of your “just passing through” traffic is coming from and show them adverts, except for social bookmarking websites of course.
  • If my blog showed you adverts, I’ll tell you “Don’t like adverts? Leave a comment and they disappear.” below the comments form. At least one person has commented favourably about that.
  • Fill the competitive ad filter with low paying URLs. If you’re still showing ads from helium.com then you’re missing out. If your daily eCPM isn’t at least $5 you’re not making the most of your advertising. Subscribe to notspam.org to see which MFA and low paying sites go into my competitive ad filter. I’ll talk about the competitive ad filter in more detail in a future post.
  • Set an hour long cookie for users from search engines. Blogs have a notoriously low attention span for most visitors but if they click to the front page, show them a few more ads.
  • I use Kontera too but the returns from that have been very disappointing. One of my posts has an AuctionAds unit in it. You’ll see that no matter what because I’m testing it for a few weeks and the post in question is almost always only hit by visitors from Google.

I run advertising on my photoblog, In Photos dot org too but the rules there are a bit different:

  • Each post has a big image, pushing the text description below the fold. That’s not ideal for displaying adverts so I use the left sidebar to show a 600px high Adsense skyscraper unit.
  • Show the sidebar advert even on the homepage. It’s not an ideal location so better give it as much exposure as possible.
  • It’s difficult to attract visitors to a photoblog. I wrote 11 seo tips for your photoblog to outline some of the ways I draw traffic in. The biggest mistake is definitely not writing about your photography. If there is no text, how can the search engines figure out what your blog is about?

I’m not the only one only showing adverts to selective visitors. Recently Ben Gillbanks had a great post on increasing Adsense earnings that says some of the same things I summarised here.

I haven’t tried it yet, but the who sees ads plugin from Ozh does most of the same checks I do. That plugin won the WordPress plugin competition so congratulations to Ozh on winning!

The No Adverts for Friends plugin

Announcing my shiny new, rough as anything No Adverts for Friends plugin! This plugin adds new commands that you can use in your templates. Use them to surround your Google Adsense or other advertising code.

The No Adverts for Friends API:

  • is_regular_user() – returns true if the visitor has left a comment or is logged into your blog.
  • is_whitelisted_site( $url ) – returns true if $url is in a pre-defined list of friend sites like Digg, Delicious and StumbleUpon.
  • is_old_post() – returns true if the current post is over a month old.
  • is_searchengine_user() – if a user comes from one of the listed search engines or this is an old post return true.

Each of the API calls depends on the one before it returning a favourable value. For example, is_old_post() won’t return true if is_regular_user() returned true, no matter how old the post is.

Example usage:
<?php if( is_searchengine_user() == false ) { echo "Google adsense code goes here"; }?>
Edit single.php in your current theme and add that code somewhere within the loop. Now either visit an old page on your blog or use a Google search query to bring you to your blog. Hopefully you’ll see the text “Google adsense code goes here”. Replace this text with the Google Adsense Javascript.

Download

Install

  1. Rename both files to .php and place friendsadverts.php in your plugins folder. If you use WP-Cache copy wp-cache-phase1.php into plugins/wp-cache/ overwriting the file already there (make a backup first!)
  2. If you use WP-Cache copy the $nevershowads and $passingthrough arrays from friendsadverts.php into your wp-config.php. They’re needed by WP-Cache which kicks in well before plugins are loaded.
  3. Activate the “No Adverts for Friends” plugin from your plugins page and modify your templates using the new API.

Well, you’ve read this far. If some of the advice in this post helps you, if you like this plugin, if it improves the user experience of your regular visitors and maybe even increases your advertising revenue please consider uncommenting the add_action() command at the start of friendsadverts.php. The donnchas_happy_happy_notice() function prints a message in your blog’s footer saying you use this plugin and links back here.

Thanks John for bugging me to write this up. Hopefully I’ll see you at next year’s WordCamp!

gmail: no third-party DSNs

Be careful if you forward email to a gmail account. Gmail doesn’t like receiving mail delivery status notices or reports. This server filled up overnight with tens of thousands of email reports bouncing back and forth between it and gmail. If you emailed me in the last 24 hours and I haven’t replied, I may not have received it (yet).

postfix/cleanup[12107]: 9FE58326C1: reject: header Content-Type: multipart/report; report-type=delivery-status;??boundary=”A507733AD3.1188834275/mail.ocaoimh.ie” from local; from=<donncha_@_ocaoimh.ie> to=<xxxx@gmail.com>: no third-party DSNs

I really haven’t had any luck with email recently …

How I fixed everything

  • First of all I disabled the forward to my gmail accounts by moving .procmailrc out of the way.
  • Then I deleted a lot of log files to make more breathing space for everything and watched the mail spool into my mail file.
  • That was taking too long so I shutdown Postfix and went into /var/spool/postfix/ and into the active, incoming and maildrop folders where I moved every file with the string “Undelivered Mail Returned to Sender” out of the way:

    for i in `grep "Undelivered Mail Returned to Sender" * -rl`; do mv $i /tmp/xxx/ -vi; done

  • After restoring the .procmailrc, I restarted Postfix and lots of legitimate email started flowing again!
  • I added the following recipe to my .procmailrc which I hope will stop bounced messages getting to Google:

    :0:
    * ^Subject: Undelivered Mail Returned to Sender
    POSTMASTER.txt

What caused the problem in the first place? A bounced email from Yahoo. Someone left a comment with a fake email address, subscribed to the post and when another comment was left on that post the subscription email bounced. It’s worked before fine so I’m not sure why Google are complaining now! Over 2GB of bounced mail. My poor server.

Update! It happened again but I stopped Postfix at 9.5MB free on the filesystem and this time I found out what went wrong. I implemented these Postfix rules Justin blogged about without running Spamassassin. Well, I used to run SA but then when I started using Gmail I stopped, which is probably why I didn’t see this earlier. Not Justin’s fault, my own for playing with fire!

My life through Google

  • A large part of my online income depends on Google Adsense.
  • I filter my email through gmail and since this morning I’m feeding a backup gmail account with a copy of every single email I get. Thanks Matt for that idea.
  • I use Google’s search engine to find solutions to my problems.
  • Like Tom and Matt I now read my feeds through Google Reader. Not being able to hit ‘S’ to go forward a feed still sucks but my workflow has changed to accommodate it.

It’s a bit scary how much I use we use Google.

PS. I’m testing a new WordPress plugin. It needs comments to work on, so please leave a comment! It’ll hopefully see the light of day tomorrow! 🙂

Why not let Google filter your spam?

I’ve been running Spamassassin and Postgrey on my mail server for the past few months. It was only since the server was upgraded that I had enough juice to run the very intensive SA processes (even using spamd), but still on occasion the server would grind to a stop when a particularly nasty Rumpelstiltskin attack was underway.

So, last week I met Mark for a coffee and he showed me his Nokia N90 (or N80, I can’t remember) and the gmail app that was installed on it. He collects his gmail email on his phone, after it’s filtered for spam, and what with the cost of GPRS data, that’s quite a saving. I don’t intend reading my email on my phone (I hate my W810i anyway), but he did give me the idea of sending my email through Google and then popping it off into Thunderbird!

googlespam.gif

Now, I have a simple .forward to send on my email. I was able to shut down Postgrey and Spamassassin and email is delivered quickly and with few false positives or spams getting through. When I think of it, I can use the web interface to check what’s due to come down the line. You also get the added bonus of encrypted pop3 data, useful when you’re at a conference or simply on public wifi.

I’m sure everyone else has been doing this for ages and ages but hopefully this will inspire at least one person to follow suit and rid themselves of spam once and for all!

Why blogs are better #368

How else could I get on to Google Finance’s page on MSFT? It might be gone by the time you check it, but click the thumbnail for a screen capture. My boss at Tradesignals.com would have given his right arm for exposure like that!

Did I get many hits from there? Only 9 so far, but it was pretty cool to see that url pop up in my referrer stats!