Get Visitors Stay a Little Longer on your Website
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, 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&width=300&height=300&header=false&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&width=300&height=300&header=false&colorscheme=light&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 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.
Amit Agarwal
Google Developer Expert, Google Cloud Champion
Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India.
Amit has developed several popular Google add-ons including Mail Merge for Gmail and Document Studio. Read more on Lifehacker and YourStory