Taguchi Testing and Google Adsense

Everyone says – TEST. Test your ads, test you copy, test your layout – test, test, test.

However, testing is a rather annoying proposition. To be confident something makes a difference, you can only change one thing at a time, wait, then change something else. And test every combination. Over enough time to be confident it’s correct.

So if for example you decided you wanted to test three different ad titles, three different prices, and three different types of ad copy, you’d need to do 3×3×3, or 27 tests!

So it’s with some eagerness I’ve been exploring Taguchi testing. The Taguchi method still requires tests, but if set up properly, it allows you to ‘fold’ these multiple tests into a much smaller number. Fewer tests mean that lower-volume sites can test effectively, and results are available much more quickly.

For example, instead of three items, and three variations, requiring 27 different test pages, I only need 18 – AND I can test even more items at the same time!

Based on the Taguchi format I’m using, I am testing two items with two variations each, five items with three variations each, and an item with 6 variations – or 2×2×3×3×3×3×3×6, for almost 6,000 possible combinations with only 18 test pages!

To put that into perspective, if it takes a week to get the visitor volume to successfully test a page with my 18-page Taguchi testing results, it would take over 6 YEARS to be that confident with regular split testing!

My initial plan? Settle the big question – what Adsense works best on my site? And in the long term, test anything I can think of – ad copy, subscriber response, price points – you name it!

I’m looking forward to some very interesting results…

How to Monitor Your Website for Free

It’s really annoying to have someone say ‘your website is down’. And it’s also annoying to check the prices for monitoring services – especially when it only takes a few lines of code to monitor your site.

In fact, if you have PHP on your system, it’s exactly this amount of code:


<?php
  // monitor a site, write errors to a log....
  // copyright (c) 2005 D.Pankhurst (BigBizBlog.com)
  // free to use - just please keep copyright in
  $url="www.YOURSITE.com"; // site to monitor
  $res="result.txt"; // your results file
  $openURL=false;
  $fp = @fsockopen ($url,80,$errno,$errstr,8);
  if($fp)
  {
    $openURL=true;
    fclose($fp);
  }
  $outString =date('YMd-H:i:s')." - ".$url.($openURL?": OK":": ERR")."\n";
  if ( !$openURL )
  {
    $fileName=dirname($_SERVER['SCRIPT_FILENAME']) .'/'.$res;
    if ( $fp = @fopen($fileName,'a+') ) // success?
    {
      fputs($fp,$outString);
      fclose($fp);
    }
  }
  echo $outString;
?>

What it does is reside on another site (obviously – it won’t do much good checking its own site), and do a test as often as needed. If the website call fails, then the program writes a record of the failure to disk, allowing you to easily check it day in, day out.

To use, just:

  • Copy the code to a file, making sure you rename the website ($url) to yours, and the text file ($res) to whatever suits you.
  • Upload the code as anything you want – check.php, for instance.
  • Upload an empty text file, called result.txt (or whatever you set $res to) to the same directory.
  • Change the text file’s permission to 777.
  • Add a CRONTAB entry for this program that will allow it to be called regularly – here’s an example:
    
    * * * * * wget -q -O /dev/null http://www.YOURSITE.com/check.php
    

You can set to run this at any interval that’s suitable, but I find once a minute works well.

Now, whenever your (other) site is down, the call fails, and an entry is written to disk. From your browser, you can look at the text file (bookmark it if you want), and know how your site is doing.

And now for something off-topic: if you found this easy to set up, then you’ll have no trouble with ActiveLinker, my product to give you your own ‘tinyurl’ service, and protect affiliate links. Buy it today.

SSI and SEO – How to Avoid Losing PageRank

A problem cropped up on one of my sites. I wanted a massive redesign, but at 100+ pages, I wasn’t looking forward to the retrofit.

Worse yet, I didn’t know exactly what I wanted, so I had a choice – tinker and tinker until I was happy, or incrementally upgrade, see what works, and end up updating pages like crazy.

In the end, I broke down and looked into Server Side Includes (SSI). Although SSI can be used for a variety of uses, I just wanted text included: create common elements of my site (title, navigation bar, bottom copyright), put them in a separate file, and thereby make updating much easier.

For instance, I could put my page banner along the top into a seperate file, and then for every web page simply include the file with this command:

<!--#include file="ssi_hdr.txt"-->

The end result is the server ‘pours’ this page into the other, and the end user sees the merged pages – including the new banner code.

And I get the benefit of having one page on my site with the banner code – so I only have a single page to change when I want a redesign.

But one big problem – you normally have to rename your files to the ‘.shtml’ extension, and we all know what renaming web pages does for search engines.

My solution? A great write up on SSI explained common options. For retrofitting, you have two ways of doing it, by adding section to your .htaccess file:


AddType text/html .html
AddHandler server-parsed .html
AddType text/html .htm
AddHandler server-parsed .htmXBitHack on

…or…

XBitHack on

With the first option, all your web pages will be checked, with the second, only pages that have their execute bit set will be checked for code.

Why the two options? Well, the power of SSI comes with a price – increased processing time. If you need it on only one or two pages, having all web pages checked for SSI commands is a timewaster.

On the other handle, always remembering to set the execute bit can be annoying, especially if all the pages on your site use SSI.

But, restricting SSI is a good thing – as a security issue, if you allow SSI across your site, you have to be very careful that user input is never displayed raw (such as in a comment or a guestbook). Otherwise, a user could enter the SSI commands, and the web page would execute them when displayed – with predictably bad results.

Using either option, you can combine the ease of maintenance with SSI, and keep that old site in the search engines. And reduce your workload to boot.

HTML/PHP Random Image Rotation – Redux

I’m pleased as punch – I took my picture rotator php code, added a few more tweaks and twiddles, and submitted it to SitePoint.com? Result? They published it, and now I’m an official SitePoint contributor.

For those that missed the earlier posting, the code was a simple random image rotator script in PHP. What made it unique was:

  • It could be called from an <img> tag, allowing it to be used from regular html (important for jobs where PHP pages weren’t an option).
  • It allowed more than one image per page, without repetition (mostly).

The article adds a bit more to the code (including a PHP-only solution). Besides SitePoint, I’ve also posted it to my site (finally!). The code is free for all, and I hope it benefits you (I ask that you keep the copyright in ït and of course think of me when you’ve got a PHP project coming up…)

The Joy of Writing vs Making Money

The first week, and already I’m missing posts…

Actually, I have two good reasons for skipping yesterday – the first one was that I actually had too much to say. Wrote it all down, found it too spread out to make a cohesive entry, and mothballed everything so I could spread it out over time.

This wasn’t laziness or vanity – according to a seminar I heard about ‘second hand’ (where all the best rumors come from), Google likes web pages of a certain length – currently around 200-300 words. A year ago, 700-800 was consider fine (of course, I could already tell that less was better: I have articles with AdSense on them, and shorter ones usually end up better targeted).

The second reason was money-oriented – I’ve been working on my paying sites, in particular Gift-Cal.com and byGwen.com, my wife’s art site.

I already described the PHP for rotating a series of pictures – but I also worked on a catalog/shopping cart style code in PHP. Each shows catalog images/thumbnails of the products (calendars or artwork) – you can click on it to view more detail, and order by PayPal.

The result is a couple of small, light sites, with PayPal payment processing (instead of a merchant account), no need for a db backend, and a single easy to maintain file for data (image name, title, description, price, as well as id and category numbers).

Besides a great workout in PHP (I’ve only just started it this November), it was an opportunity to tailor a site the way I wanted, rather than try to fit my model into a prebuilt solution. There’s still more to do behind the scenes (right now, I edit the data file by hand, instead of creating an Admin section to handle it), but it works, and I like the result – you can of course drop by byGwen.com and Gift-Cal.com and see if you agree.