web statistics

How To Show The Number of Visitors From Twitter To Your Post

Posted on July 12th, 2009 under Tips,Tricks and Hacks, Twitter, WordPress
ADVERTISMENTS
Share |

I’ve recently read an article at DBT, about how tweetmeme can help increase the number of tweets, of your post and thought of implementing tweetmeme, but tweetmeme show only the number of times your post has been retweetd.

Some blogs like showing the number of time a post has been read to show how popular a post is,but the number of visitors coming from twitter can also be a good indicator of traffic coming from the popular micro blogging site.You can now show the it using a simple script developed using the Bit.ly JavaScript retweet buttonAPI by John Resig which also doubles up as a retweet button.

The script has 2 variations in its display, horizontal and vertical.

Customize the script.

Download the .js Script File

Open and Edit the values in the JSfile

  • RetweetJS.link_text (Default: “Retweet”) – Change this to another value and change the text in the Button.
  • RetweetJS.count_text (Default: “clicks”) – Right now only “clicks” are supported but if you specify “none” it will show no count.
  • RetweetJS.prefix (Default: “”) – Setting to “RT @<twitter username>” will add it to the front of the tweets.
  • RetweetJS.styling (Default: The full CSS used for styling the retweet button.)

Integrate the script into Wordpress

  1. Include the path to retweet.js file in the <head> of your web site.For Example :
    1. <script src=”<?php bloginfo(’stylesheet_directory’); ?>/js/retweet.js”></script>
  2. Add a class of ‘retweet’ in the anchor tag in the single.php file.For Ex.

<a href=”<?php the_permalink() ?>” class=”retweet” rel= “nofollow”><?php the_title(); ?></a>

Features :

  • Completely Unobtrusive You can place the script in the <head> of your document instead of inline which many other such scripts do.
  • Speed Retweet.js works completely asynchronously, loading data and updating the rendering as it comes in.
  • Pure HTML/CSS The result is just pure HTML styled with CSS – you can customize it however you wish, no images are required.
  • Number of clicks, not retweets - The number of clicks coming in is shown instead of the number of tweets your post got.
  • You control the data All tracking works directly through Bit.ly and all the clicks and traffic can be stored straight in your bit.ly account.

The script has been tested in Internet Explorer 6-8, Opera 9-10, Safari 3.2-4, Chrome 2, and Firefox 3-3.5.

Source: WebResourcesDepot

Written by Avinash

Browse Tech Yard for the latest & interesting web applications, Freewares, Wordpress Tips, Firefox Hacks and Addons, Mobile Phones, Windows - Linux - MAC OS Tricks.

Stumble Digg Technorati Reddit Delicious


Related Posts

Leave a Reply

Subscribe to TECH YARD:

RSS

Grab the RSS feed for Free Updates!


subscribe

Get blog updates sent directly to your inbox by entering your email address above.



Recent Comments

Hey, anyone know if this is going to be available for Win7 any time soon? W...
Hi, thanks for the post, I am trying to modify this plugin to work on my sl...
It does not work with windows 7 please help...
I want to be able to pick and choose which applications are fetched during ...
hi this is good antiviruas soft...
Where can I find those input files? It doesn't say anywhere....
Very nice! Works exactly as described. Thank you!...
do you have any idea abt price???????...
Before I got my reliance connection, I have to search daily for free sms si...
I think we can find the Mobile operator using various online services also....