Wednesday, January 12, 2011

Get Visitors Stay a Little Longer on your Website

Source: http://www.labnol.org/internet/site-visitors-stay-longer/18469/

As a website owner, you not only want to attract more visitors to your website but you would also like them to stay a little longer while they are on your site.

Let me share two experiments in this direction that seem to be working out well for my blog. These require no programming and can be used on any website /blog as long as you have the freedom to add a couple of lines of JavaScript to your template.

1. Facebook Recommendations

Ever since I added a Facebook widget to my blog's sidebar (screenshot), I have noticed that the average time spent by a visitor on this site has increased.

That makes sense because this unique widget lists your blog's most recent articles in a unique order of "social popularity" and people do like to check out content that their friends and others may have liked.

Facebook offers two types of widgets – recommendations and recent activity. You can put them both on the same page and rotate (similar to split-testing). The code for that looks something like this – remember to replace labnol.org with the domain of your website.

   1: <script type="text/javascript">    2: var fb = Math.random();    3: if (fb < .5){    4:  document.write('<iframe src="http://www.facebook.com/plugins/recommendations.php?site=labnol.org&amp;width=300&amp;height=300&amp;header=false&amp;colorscheme=light" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:300px; height:300px;" allowTransparency="true"></iframe>');    5: } else {    6:  document.write('<iframe src="http://www.facebook.com/plugins/activity.php?site=labnol.org&amp;width=300&amp;height=300&amp;header=false&amp;colorscheme=light&amp;recommendations=true" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:300px; height:300px;" allowTransparency="true"></iframe>');    7: }    8: </script>

2. Twitter Favorites

Most websites now embed a Twitter widget that either displays the most recent tweets of the website owner or the conversations (aka @replies) that he or she is currently having with others on Twitter.

I also use the Twitter widget on my blog homepage (see the sidebar) but in a slightly different manner. Whenever there's a tweet that mentions one of my blog stories I add that tweet to my Twitter favorites. These recommendations then automatically appear on the site through the faves widget of Twitter.

The big advantage with Twitter's widget is that you get to easily promote even your older content which otherwise stays hidden in the archives and may never get noticed by new visitors.

Also see: Discover the Most Popular Links on a Page

Facebook    Twitter    Digital Inspiration @labnol

This article, titled Get Visitors Stay a Little Longer on your Website, was originally published at Digital Inspiration under Blogging, Seo, Internet.