Adam Green
Twitter API Consultant
adam@140dev.com
781-879-2960
@140dev

Making aggregated tweets visible to Google for SEO

Whenever I see a page that aggregates tweets, I always view the page’s source to learn how they manage their tweet loading and display.  Most of the time I can only see calls to Javascript that appear to load tweets into specific divs within the page, but the tweets themselves are not visible in the HTML of the page. An example of this approach is at the SportsFanLive site.  This is such a waste from an SEO perspective.

Tweets are great for optimizing pages for Google rank. Because of the 140 character limit, tweets tend to be very dense with keywords, much denser than blog posts. Tweets are largely nouns and verbs, the type of text that Google loves. If you aggregate tweets for a set of keywords, you will have a stream of text that can make any page appealing to Google. Another SEO advantage of tweets is that the flow of new text is so high. If you make aggregated tweets visible on a web page, and make sure that the most recent tweets will be used each time the page loads, that page will gain in Google rank. Of course, you should also guide Google with the usual collection of meta tags and headings as well. So adding a stream of keyword targeted tweets to a page is a great SEO technique. It gives you a steadily changing set of keyword dense text for free. A decade ago SEOs discovered the idea of displaying aggregated RSS feeds from blogs to page, and aggregated tweets are just the next step in this process.

So why do so many programmers build pages that display tweets through Javascript, making them invisible to Google? I think it is a matter of programmers focusing on the tweet refresh mechanism instead of the initial page load. The basic way to display tweets through Javascript is to create a div with a specific ID, and then use Javascript and Ajax to request the most recent tweets when the page is loaded. The tweets are returned as either JSON or HTML, and then the Javascript adds them with CSS formatting to the named div. If you want to refresh the tweets, either at a regular interval or when the user clicks a refresh link, you can call the same Javascript again, download fresh tweets, and put them into the same div. Easy to do, but worthless for SEO.

A much better approach is to use PHP, or whatever web language you prefer, to inject the first set of tweets into the div when the page is first loaded. This makes them visible as normal HTML for Google consumption. Then you can still use Javascript to refresh the tweets at any time after the page is loaded. This may require some duplication of code, since you have to deliver tweets in HTML to the server-based page code, and deliver them again to the client-based Javascript code, but this is a small price to pay for all that fresh Google juice.