Optimizing WordPress Tag Pages

Normally I don’t like to write about “blogging,” but since website traffic generates some interesting data, it’s worth looking at it from a computer science perspective, to see the issues involved.

By default, WordPress has two multi-valued fields associated with an article, “Categories” and “Tags.” Categories are treated as a closed, hierarchical set, and tags are an open, flat set. The software uses these and other attributes to generate lots of pages of dubious value (date-based archives, for instance). Coming up with the “right” tags is a bit of a puzzle, and I find my needs changing with time. For instance one might use this to tag posts with phrases not in the post that have some SEO value, or one might use it to generate a table of contents style index. Consider for instance the “Antiques” page on About.com:

about

By default the /tag/[tag name] pages in WordPress are lists of posts, which is a poor choice, considering the amount of scrolling involved. Recently I made a few changes, modifying the URL from “/tag/[item]” to “/examples/[item],” which made it easy to separate the data:

Before:
tag-tag
After:
examples-tag

I made simple modifications to the title boxes on the page:

function get_custom_title($value) {
  $result = '';
  $value = trim(strtolower($value));
  if ($value == 'extjs examples' or
    $value == 'extjs 4 examples'
  ) {
    $result = ucwords($value);
  } else {
    $result = "Gary's Guide To " . $result = ucwords($value);
  }

  $result = str_replace("Extjs", "Ext JS", $result);
  $result = str_replace("Ext Js", "Ext JS", $result);
  $result = str_replace("Nlp", "Natural Language Processing", $result);

  return $result;
}

Similarly, I also added an introductory paragraph to each page (a generated sentence by default, or a paragraph for pages I care about). Each page now has a table of contents at the top, followed by post summaries, which you can see on the page about scraping:

scraping

Even though this still looks awful, you can see a noticeable boost in the metrics:
metrics-before

After:
metrics-after

It looks like people are finding something useful and clicking away to it much quicker, since time on page and bounce rate are a lot lower (% exit is determined by how many visitors leave from this page vs the rest of the site – this is likely more dependent where people are landing when they start on my site). At this point there isn’t enough data to say much about per page numbers (considering that visits drop off exponentially, only the top two or three are meaningful). The best way to improve these pages now is likely to improve the selection of content, followed by better introductory text and article summaries, as well as fixing rendering issues.

Leave a Reply

Your email address will not be published. Required fields are marked *