Table of contents
Now I hadn’t paid too much attention to this new feature until we started testing a new search traffic monitoring tool we’ve built at OrangeValley, and I noticed that 5% of the traffic coming to my WordPress SEO article had such rich “jump to” snippets. I could see this because they entered the site with a URL with a fragment identifier (aka hash: #) in it.
Now 5% of the traffic didn’t immediately make me go all nuts, until I started thinking about what this meant usability wise: instead of people having to search within the article for the content they came for, they’re taken straight there. That’s a bonus, right? I’ve yet to prove that this improves conversions, but I’d guess it would.
Researching jump to snippets
So here starts the research: how do we optimize for these rich snippets? In the post on the Google Webmaster blog accompanying the official release, they state that:
There are a few things you can do to increase the chances that they [these jump to snippets, JdV] might appear on your pages. First, ensure that long, multi-topic pages on your site are well-structured and broken into distinct logical sections. Second, ensure that each section has an associated anchor with a descriptive name (i.e., not just “Section 2.1”), and that your page includes a “table of contents” which links to the individual anchors.
When I dove more deeply into our stats, I noticed a couple of things:
- almost every article that has an internal Table of Contents is getting this kind of traffic
- those articles are getting more search engine traffic in general (probably related to their length too)
- they use different ways of identifying the anchor, and all seem to work
- their tables of contents are always marked up using a list
- articles with “just” inline internal links to other parts of the article do not seem to get this kind of traffic
How to create internal anchors
Basically there’s three ways of defining these anchors:
1. <h2 id="heading">Heading</h2> 2. <h2><a id="heading">Heading</a></h2> 3. <h2><a name="heading">Heading</a></h2>
All three options require linking to them like this:
Where my WordPress SEO article uses option #2, our Magento SEO is using option #1, and the examples Google gives are using option #3. I can’t see any real reason to choose one over the other, so I chose the cleanest one: option #1.
Optimizing for jump to snippets
So what do we need to do?
It turns out this is awfully simple, you need to do two things:
- properly identify the different sections of longer articles, and identify their headings with fragments;
- create a table of contents, linking to these fragments.
While the Magento SEO article has a clearly marked Table of Contents, the WordPress SEO article only has a listing of internal links, without any heading. They do have one thing in common: a list, either
ol linking to the different sections with their appropriate fragments.
So your table of contents should look like something like this at the minimum:
<ol> <li><a href="#research">Researching jump to snippets</a></li> <li><a href="#createinternal">How to create internal anchors</a></li> <li><a href="#optimization">Optimizing for jump to snippets</a></li> </ol>
I’ll keep track of this kind of traffic from now on, and I’ll let you know if I find any more optimizations. There’s one caveat to this: this is not based on a very large data set yet, and it just so happens to be that all of the pages with ToC’s I found getting this traffic have these ToC’s marked up as lists. It could be that other ways of marking up a ToC work too, I just haven’t found a working example yet.