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

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 JavaScript API 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 and all the clicks and traffic can be stored straight in your account.
Similar Post  How To Schedule Tweets, Track Tweet Performance and Auto Tweet On Peak Times For Maximum Impact

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

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.