Lower Your Bounce Rate With One Line of Code

While reading through the Google Analytics Event Tracking Guide, I came across this nugget:

In general, a “bounce” is described as a single-page visit to your site. In Analytics, a bounce is calculated specifically as a session that triggers only a single GIF request, such as when a user comes to a single page on your website and then exits without causing any other request to the Analytics server for that session. However, if you implement Event Tracking for your site, you might notice a change in bounce rate metrics for those pages where Event Tracking is present. This is because Event Tracking, like page tracking is classified as an interaction request.

Of course having read through several SEO related posts identifying bounce rate as a ranking factor (or at a minimum a quality signal), I devised a way to game it.

<div id="header" onMouseOver="pageTracker._trackEvent('bounce', 'bouncecheck', 'Look Ma No Bounce');">

I figure a mouseover on my header will probably be triggered enough to dramatically drop my bounce rate without looking too artificially manipulated. Plus I wonder if a body onLoad statement would be overkill, or trigger faster than the gif request. Anyway after implementing this for one day you can see the huge difference below.




Now while my method is obviously solely aimed at gaming the system, there are some legitimate uses. A few examples that come to mind where firing off an event make sense are video plays, if the end of a javascripted animation, newsletter signups, rss subscribes and there are probably a thousand more.

SEO Friendly Split Testing

I’ve recently been spending most of my time split testing the designs across many of the sites I manage. The question is always raised – how will this effect my seo? Unfortunately website owners aren’t allowed to serve up different page versions to search engines than to regular visitors – without risking the wrath of Google. (That is unless you’re one of the big brands) This technique is commonly referred to as “cloaking” and is expressly in violation of Google’s webmaster guidelines.

Luckily we have a new tool at our disposal to set things straight with some level of reliability – the link canonical tag. According to Google:

If your site has identical or vastly similar content that’s accessible through multiple URLs, this format provides you with more control over the URL returned in search results. It also helps to make sure that properties such as link popularity are consolidated to your preferred version.

Let’s assume three split test variant pages:

  • index.php
  • indexb.php
  • indexc.php

To properly point each page to the original you would simply place this tag in the HEAD statement of each page:

<link rel="canonical" href="http://www.domain.com/index.php">

What about other search engines you say? Well luckily Yahoo! and Bing announced support for the link canonical tag at the same time as Google. YMMV with these second-tier search engines – but at least they have stated their intent to honor it.

A second level of protection can be added by adding a meta tag to each page to prevent indexation. I would recommend a setting of NOINDEX, FOLLOW as seen below:

<meta name="robots" content="NOINDEX, FOLLOW" >

Obviously this method is ONLY going to work if you are split testing and not multivariate testing.

WordPress SEO Guide (ver 2.8.1)

I recently revisited this blog to make some SEO improvements. I’ve made a few structural changes to improve my site’s indexing that I’m happy to share. WordPress does a great job of building internal links and with a few tweaks you can squeeze those last precious drops of link juice out. While reading this please keep in mind that you probably shouldn’t make any of these changes to a live site, but if you do, disable any sitemap generation plugins you might have. If you ping Google while making iterative changes to your permalink structure you are bound to end up having Google send visitors to non-existent pages.

  • SEO-Friendly URLs

    Many WordPress blogs use date based permalinks (e.g. /2009/07/11/blog-title/), mainly because it’s the most seo-friendly option of the defaults available. However, using categories adds more relevant keywords to each url and removes a duplicate navigation entry point. As a result, I use the category/post title format. To set up these slightly more seo-friendly urls you must login to the admin screen, navigate to settings->permalinks and enter in the following custom values:

    /%category%/%postname%/
  • 301 Redirect Your Old URLs

    On an existing blog like this one, you don’t want to lose any back links pointing to your blog posts. In order to do this you will need to create 301 redirects from the old URLs to the new ones. A 301 redirect is a server code that gets sent to your browser informing it (transparently) that the content you were seeking is now permanently moved to a new location. The browser then automatically retrieves the new url without any input from the user. Googlebot also follows these server codes and will credit the new url specified with the back links pointed to the previous url. Setting up these redirects is typically done (on Apache servers) via a module called mod rewrite. Apache uses a special file named .htaccess to manage redirects. You can specify each redirect by hand in your .htaccess file (which could take forever on a large blog), programmatically via regex, or you can just download Dean Lee’s Permalinks Migration Plugin which does the trick without requiring you to learn mod rewrite syntax. Just install the plugin in your admin interface, specify both your old and new permalink structures and you are in the clear. It is always smart to make sure a 301 server code is being sent with the location of the new URL. If you use firefox, you can do this easily using the live http headers addon. When done successfully your server will send a code looking like this:

    HTTP/1.x 301 Moved Permanently
    Date: Mon, 13 Jul 2009 17:22:49 GMT
    Server: Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8b mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
    X-Powered-By: PHP/4.4.7
    X-Pingback: http://ryanunderdown.com/xmlrpc.php
    Expires: Wed, 11 Jan 1984 05:00:00 GMT
    Cache-Control: no-cache, must-revalidate, max-age=0
    Pragma: no-cache
    Last-Modified: Mon, 13 Jul 2009 17:22:49 GMT
    Location: http://ryanunderdown.com/digg/
    Content-Length: 0
    Keep-Alive: timeout=15, max=100
    Connection: Keep-Alive
    Content-Type: text/html; charset=UTF-8
  • Remove “Category” Slug from URLs

    I feel the “category” slug that WordPress adds to category page urls is one of the ugliest elements of the wordpress setup. It makes your urls inconsistent from an information retrieval standpoint. If your posts are structured “/category/post-title/” it makes sense for your category listings to be in the “/category/” folder. Unfortunately fixing it is a little difficult. After scouring the WordPress forums the best solution I’ve come up with goes against the “plugin” philosophy of WordPress – so use at your own risk follows. You will need to download and install the Top Level Categories Plugin. This plugin takes care of removing the category slug on category pages. Next you must redirect your existing category page urls to the new slug-free ones by editing your .htaccess in your blog’s root directory. Mine looks something like this:

    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    RedirectMatch 301 ^/category/(.+)$ http://ryanunderdown.com/$1
    

    Note: if your category base uses a something other than category (ie: topics) you will need to adjust the above settings to match. Now the changes above work great except for on paginated categories (e.g. http://ryanunderdown.com/seo/page/2/). To work around this issue you need to update your permalink structure yet again. Go to “Settings->Permalinks” and set your custom URL structure to the following:

    /%category%/%postname%.php

    (while researching this post I was tempted to copy seoegghead’s use of the .seo extension for pages: http://www.seoegghead.com/software/wordpress-seo-pager.seo – interesting idea)

  • Install Joost de Valk’s Robots Meta Plugin

    This is one of the more useful SEO plugins out there. It allows you to lock down the way your site gets spidered by adding noindex meta tags to dynamically generated pages like “/wp-login”. These are the settings I like:

    • noindex comments rss
    • noindex,follow search result pages
    • noindex admin pages (login & register)
    • subpages of the homepage
    • disable author archives
    • noindex your tags archives
    • add noarchive, noodp and noydir tags
    • disable author archives
    • disable date based archives
    • redirect search results when referrer is external
  • Create A Sitemap

    Download the Google Sitemap Generator plugin. This tool gives you options as to what to specifically show Google. Make sure you uncheck “include archives”. We want Googlebot to spider our site through our categories. You want to avoid links to the archives in general if you can help it.

  • Fix Your Titles

    WordPress likes to put your blog name first in post titles by default. To fix this mix up install the All-In-One SEO Pack plugin This little plugin switches up the order and gets rid of the annoying little » symbols wordpress inserts. In addition it gives you a few “per post” options – overall a decent tool.

  • Deep Link Your Existing Content

    If you’ve ever read the online edition of the New York Times you certainly have noticed how they link back to their own articles about newsworthy items, events, and people. There’s good reason for this: links (and especially anchor text) are the currency of rankings. If you are linking to an article on your blog about seo, make sure to use the anchor text “seo” not vague useless keywords like “click here”. I know of at least two three plugins that will automatically link up keywords to existing content: SEO Smart Links, Batch Links and (probably the best in the group) Gab Goldenberg’s Internal Link Building. These plugins basically require you to create a list of keyword and target url pairs. When a keyword is found in a subsequent blog post it is automagically linked to the appropriate target url (keyword landing page).

  • Disable Comment Links

    Just as inbound links increase your PageRank, outbound links drain it away – even if nofollowed. With the changes to the nofollow tag that have rendered it beyond useless, comment link droppers can put a hurt on your site’s link juice in a hurry. Hobo has a nice plugin that disables comment links for new posters.