Visitor Stats is a plugin for Movable Type 4+ that displays visitor and page view statistics for your MT sites. Visitor Stats Pro provides even more statistics and widgets (details below).
Visitor Stats looks like this:

New Features in Visitor Stats 1.6
- Support for MT 4.1
- Some template tags now supported under MT's PHP-dynamic publishing system (<MTVisitorStatsTracker>, <MTVisitorStatsCounter>, <MTEntryStats>, and <MTPageStats>)
- Option to build dashboard stats via scheduled for better performance (Pro)
- Code optimized for better overall performance
Visitor Stats Pro
Additional features included with Visitor Stats Pro:
- Blog Widget for displaying a ranked list of "Most Read Entries"
- Entry Stats graph that displays entry pages views by date.
- List of Recent Visitors and Views on the admin Dashboard (including IP address, username, referrer and keywords).
- Dashboard widgets for displaying top search engine keywords and referrers.
- Detailed Entry Stats screen with graph, top keywords used to find the entry, and a list with details of each page view for that entry.
- Many new template tags for displaying stats on the published pages for your blog.
- See details about Visitor Stats Pro below
Visitor Stats also provides a "stats counter" tag (and widget) that you can place on your site to display your stats. Note: you can visit the MT4 Test Blog to to see some of the Visitor Stats (and Pro) publishing widgets and tags in action.
Visitor and View Stats
Visitor Stats tracks two key statistics for your blog:
- Visits - A visit represents a real person who visited your blog. Even if the person views 20 pages of your site, it only counts as one visit (per day).
- Views - Also known as page views, a view represents the viewing of a single web page on your site. If the person views 20 pages, it counts as 20 views. If a person refreshes the same page several times, each time counts a view.
How it Works
Visitor Stats tracks visitor and view information and records that information directly into your Movable Type database. After placing a single template tag in your templates, Visitors Stats will begin recording stats automatically using a combination of JavaScript and PHP (note that you do not need to enable MT's dynamic publishing feature). Then, when you view the admin dashboard for your blog, you will "Visitors" and "Views" tabs on the Blog Stats widget, which will display a graph of your stats (see image above). On the System Overview dashboard, you will see aggregate graphs of your stats for all blogs on the system.
Visitor Stats - Template Tags
Visitor Stats provides 4 template tags:
- <MTVisitorStatsTracker> - Place this tag before the </head> tag in every template where you want to track stats. Only place one of these per template.
- <MTVisitorStatsCounter> - This tag will display the total number of visitors or views for your blog, just like a web stats counter. There is one optional argument:
- type - the type of stats that you want to count, which either be "visit" or "view". The default is "view". Example: <MTVisitorStatsCounter type="visit">
- New! - <MTEntryStats> - Used within an entry context, this displays the total number of views for that entry.
- New! - <MTStatsImageURL> - The URL to the small stats image ( that looks like
).There is one optional argument:
- type - the type of stats that you want to graph, which either be "visit" or "view". The default is "view". Example: <MTStatsImageURL type="visit">
Visitor Stats Pro Features
Visitor Stats Pro includes additional stats and provides ways to view visitor and view stats in more detail, helping you understand the traffic to your sites. Where are readers coming from? What search keywords are they using in search engines to find your site? What entries are they reading? Which entries get the most views? Visitor Stats Pro helps you answer these questions and more.
Display a List of the Most Popular Entries
Visitor Stats Pro includes a widget that you can use to display a ranked list of the "Most Read Entries" in your blog sidebar, showing readers which entries are the most popular. You can also create customized most readlists by category, tag, etc. Examples include "Most Read Entries in this Category", or a "related entries" section that lists that the most read entries with the same tags as the current entry. This is a powerful feature with many possibilities.
Detailed Stats for Each Entry
In the MT4 admin interface, Visitor Stats Pro displays detailed view stats for each entry. On the entry screen, an Entry Views graph can display the traffic history for that entry:

(The graph on the edit entry screen can be hidden with a single click, or disabled in the plugin settings, for those who don't want to the graph to appear on this screen)
On the right side of the Edit Entry screen, the number of views for that entry will be displayed, and you can click the link for Detailed Stats:

The same graph also appears on the Detailed Stats screen for each entry (just click the "More Stats" link from the main entry screen), plus a list of top keywords for that entry, and a detailed list of the pages views for that entry:

As you can see from the image above, in addition to displaying the IP address for each Visitor (just to left of this image), Visitor Stats Pro will also identify visitors and views by registered users on your system. This includes both local MT authenticated users, as well as TypeKey, Vox, Livejournal, or other OpenID users. This provides valuable information about the traffic stats of your signed-in users. You can even filter the list of page views by dragging the sliders on the graph -- just choose a date range, then click the link that appears. The "From" column shows the URL that the visitor came from before arriving on your site.
More Dashboard Stats
Visitor Stats Pro provides even more stats on the MT4 admin dashboard. This includes a summary of recent visitors and views, along with detail about each. This is similar to the "Recent Entries" and "Recent Comments" displayed when you click the respective tab on the Blog Stats widget:

Top Keywords and Referrers Dashboard Widgets
Visitor Stats Pro includes two new widgets that you can optionally display on your admin dashboard. The "Top Keywords" widget will display a list of the top search engine keywords used to find your blog:

And the "Top Referrers" widget will display a list of the top referrer URLs for your visitors, so you can see where your traffic is coming from:

Many Visitor Stats Pro Template Tags
Visitor Stats Pro includes many new template tags that you can use to display your blog stats on your published pages, blog sidebar, etc. In addition to display lists of "most viewed entries" as described above, you can display lists of top keywords, top referrers, recent visitors, and recent page views. If fact there are so many new template tags, that I won't discuss them in detail here -- I will soon post a separate article that describes the tags with some example template code.
Requirements
- MT4.0+
- mySQL
- PHP
- Template Installer plugin
- URI::ParseSearchString Perl Module (included in download file) - Pro Version Only
Installation or Upgrade
Note: If you are upgrading from version 1.5x, you do not need to reinstall the templates, as they have not changed in version 1.6.
- Download and extract the zip file, then upload the contents of the 'plugins' directory into the 'plugins' directory of your Movable Type installation (often /cgi-bin/mt/plugins/).
- (Pro Version Only) Upload the contents of the 'extlib' directory into the 'extlib' directory of your Movable Type installation (often /cgi-bin/mt/extlib/).
- (Pro Version Only) Upload the contents of the 'mt-static' directory into the 'mt-static' directory used by your Movable Type installation.
- Login to MT and you should be redirected to an "Upgrade" screen that will update your database automatically.
- For each blog that you want to track, go to Preferences > Plugins and then click on "Visitor Stats" and then click on "Settings". Now click the link labeled "Click here to install the Visitor Stats templates". Note: Even if you are upgrading from a previous version, you should re-install the templates.
- Now go to Design > Templates and insert the <MTVisitorStatsTracker> tag before the </head> tag for all templates that you want to track. Note that if you are using the new MT4 default templates, then you only have to do this in one place: click on "Template Modules" from the right side of the page and open the "Header" template module and insert the <MTVisitorStatsTracker> before the </head> tag and then save the module. Note: If you are upgrading from a previous version of Visitor Stats, you can skip this step.
- Now Publish (rebuild) all your files.
- (Optional) Add the <MTVisitorStatsCounter> tag to your templates or use Widget Manger to add the "Visitor Stats Counter" widget to your sidebar. Pro users can add the "Most Read Entries" widget and start using the many new templates tags.
Get Visitor Stats Pro
Commercial License - $97
Non Commercial Use License - $33
Get Visitor Stats
Visitor Stats (Basic Version) is free to members of MT Hacks.
Download Now
Membership required, please sign-in or register:
Potential Future Features
Visitor Stats Pro was a much larger effort than I anticipated. As such, there are still a number of interesting features that may be added in the future. Future features will be determining largely by the requests of Visitor Stats Pro license holders. Here are some of the potential features:
- Stats on a per author basis. If you have a blog with multiple authors, see which authors are generating the most traffic.
- Drill-down into statistics. View the traffic history for a single visitor or registered commenter, see how they navigate through your site and which pages they viewed.
- Geographical stats. See what country, region and city your visitors are coming from.
- Recommended entries based on common viewing stats. For example "people who read this entry also read these entries..."
- And more...
As always, suggestions, comments, and questions are appreciated.
A Note on the Small Stats Graphs
The small stats graphs included with this version of Visitor Stats are called Sparklines and were inspired by the SparkStats plugin for Wordpress. The sparkline graphs used by the Visitor Stats plugin are powered by the sparkline web service provided by bitworking.org. The plugin stores a copy of the image on your blog, and updates the image a maximum of once per hour (note that that stats image only updates when the page is published, either manually or automatically when someone posts a comment, etc.). Credit goes to those sites discussed above for their cool work with Sparklines.


Comments (28)
I have to say you keep making this plugin more amazing with every revision Mark. Best plugin I have seen for MT!
Just one issue I seem to have with 1.6 Pro: When I click on the "more stats" or "X views" in the edit entry page I get a page with a lot of blank space between the text "Visitor Stats" at the top and the graph, as well as another big area of blank space between the graph and the footer.
Posted by Carlo
|
January 31, 2008 6:12 PM
Posted on January 31, 2008 18:12
One thing I just thought of.. Is there a way to post a list of Most Popular Entries for a selected time period? For example.. I woudln't want stats from the past two years or so to go in there cuase it wouldn't be relative, and maybe be able to choose the list to only include only the last month, week, or days (etc.) of stats to go into the weighting of entries for the list.
Posted by Carlo
|
January 31, 2008 8:24 PM
Posted on January 31, 2008 20:24
Getting an error on upgrade:
Can't locate object method "datasource" via package "VisitorStats::View" at lib/MT/Upgrade.pm line 1270.
Posted by dm
|
January 31, 2008 8:35 PM
Posted on January 31, 2008 20:35
dm, a few people have reported this problem, but I can't reproduce it on my server. Any details you can provide would help: MT version? previous version of Visitor Stats? etc...
Posted by Mark Carey
|
January 31, 2008 8:59 PM
Posted on January 31, 2008 20:59
MT version 4.1, Visitor Stats 1.5.
Posted by dm
|
January 31, 2008 9:39 PM
Posted on January 31, 2008 21:39
Reinstalled the 1.6.1 version. Installs now, but now the main dashboard settings doesn't show anything. I'm in the middle of republishing all my files so maybe it'll clear up after this happens.
Posted by dm
|
February 1, 2008 1:36 PM
Posted on February 1, 2008 13:36
Sorry... wasn't being clear... The dashboard, under blog stats. It shows Entries, Comments in the title bar, but there are no graphs. Which is rather strange. I'll wait a little bit and see if something shows up after the rebuild.
Posted by dm
|
February 1, 2008 1:43 PM
Posted on February 1, 2008 13:43
dm, its another bug, this one caused by the fix to the previous one ;)
I am trying to get both the basic and Pro versions to work on both MT4.0 and MT4.1, and with all the combinations involved, a few things didn't get fleshed out in my testing.
Version 1.62 has been released, get it from the same download link above.
(Note: this issue does not apply to the Pro version, so no update is needed if you are running Pro 1.61).
Posted by Mark Carey
|
February 1, 2008 1:49 PM
Posted on February 1, 2008 13:49
Okay... the site rebuilt. Officially, the graphs have disappeared after installing Visitor Stats plugin 1.61.
Posted by dm
|
February 1, 2008 2:48 PM
Posted on February 1, 2008 14:48
Ahh... oops. :) Didn't see that you released a new version. Onto another re-installing! lol. Thanks for being quick on the bug fixes, Mark!
Posted by dm
|
February 1, 2008 2:49 PM
Posted on February 1, 2008 14:49
Sweet. works now! Thanks! If you ever need someone to beta test your things, let me know. :)
I seem to break a lot of it. lol.
Posted by dm
|
February 1, 2008 2:57 PM
Posted on February 1, 2008 14:57
The way I see it dm better you break it now than 100 people later and all of them having to update the fixes ;)
Posted by Carlo
|
February 1, 2008 4:12 PM
Posted on February 1, 2008 16:12
Mark, in the screenshot above for the Blog Stats widget, there's a blue link below the widget stating how many visitors/views you received for the given date range. My VisitorStats installation (MT4.1, VS1.6) doesn't show that link. When will you have it enabled? I'd love to see a list of which postings were read on a given day. Thanks!
Posted by Tom Mollerus
|
February 5, 2008 4:41 PM
Posted on February 5, 2008 16:41
When I try to install the templates for a specific blog I get the following error: Loading template 'get_template_installer.tmpl' failed.
I'm using a clean installation of MT 4.1 and the free version of this plugin. Any suggestions on how to correct this?
Thanks in advance!
Posted by arsenie
|
February 7, 2008 3:54 AM
Posted on February 7, 2008 03:54
I'm still having issues with the dashboard and visitor stats. I can get it to load about once out of every ten times, the rest of the time it just gives me a server error 500 and times out.
Any ideas?
Posted by rm_blogger
|
February 12, 2008 9:55 PM
Posted on February 12, 2008 21:55
Also receiving the "Loading template 'get_template_installer.tmpl' failed." error message during attempted install of the Basic 1.62 version on MT 4.01a.
Haven't located any information regarding this error. Any details available? Thanks!
Posted by Skavoovie
|
February 13, 2008 4:16 PM
Posted on February 13, 2008 16:16
...finally re-read the installation process. Doh! Missing dependency!
Installed the required Template Installer plugin per the install instructions, and re-installed the VisitorStats plugin and the templates installed without problem...imagine that. :)
Posted by Skavoovie
|
February 13, 2008 4:56 PM
Posted on February 13, 2008 16:56
I had install probs, but because I run postgresql on that box. Doh!
Anyone get this working with postgres?
Posted by Leonardo | February 22, 2008 5:37 PM
Posted on February 22, 2008 17:37
Hi Mark,
I added to the Entry Metadata template module. It shows but always shows the count as 0 only. Am I missing something in the header or anywhere else?
Thanks in advance for any help.
Posted by sicminded
|
February 28, 2008 4:50 PM
Posted on February 28, 2008 16:50
err.. added MTEntryStats
Posted by sicminded
|
February 28, 2008 4:51 PM
Posted on February 28, 2008 16:51
How about a way to identify people who haven't logged in or registered but who have left a comment and whose details are therefore cookied? Mint's Secret Crush pepper (http://haveamint.com/peppermill/pepper/10/secret_crush/) can do it, although I'm not sure if that's because it's JavaScript-powered/client-side.
Posted by Rob Buckley | March 11, 2008 9:28 AM
Posted on March 11, 2008 09:28
Hello.
It is worried because I cannot also install it.
The message is 'Failed in loading get_template_installer.tmpl'.
The version is MT-4.1-ja and Visitor Stats 1.6.
Is there a method of settlement?
Posted by koh
|
March 16, 2008 12:17 PM
Posted on March 16, 2008 12:17
Mark:
Are you still planning the article for template tags for Visitor Stats Pro?
In the meantime, I'm looking to list the five most-read entries from the past seven days, listed with the number of views from those seven days. What might that look like?
Posted by Culture Snob | March 19, 2008 11:33 PM
Posted on March 19, 2008 23:33
Hi i cant get this to work. I had to edit the template path in cms.pm to install it on my windows server:
'template_path=C:/inetpub/wwwroot/MT/plugins/VisitorStats/default_templates
But it always says 0 visitors even though i have added the to the header template. The correct tables have been created in my mysql database but what can i do?
Is it supported on windows server with php?
/Hans
Posted by shoggot
|
May 4, 2008 4:53 PM
Posted on May 4, 2008 16:53
hello,
1. How can I appoint a begin amount for my Visitor Stats?
(for example my counter start at 10000)
2. How can I change default views from 20 to another value?
3. Why doesn't the work for me?
(doesn't show the picture)
Thank
Posted by Arash | May 6, 2008 8:58 AM
Posted on May 6, 2008 08:58
CORRECTION:
3. Why doesn't the StatsImage work for me?
(doesn't show the picture)
Thank
Posted by Arash | May 6, 2008 9:01 AM
Posted on May 6, 2008 09:01
Hmmm....I've upgraded and followed all the instructions, but all the graphs show 0 ever since I upgraded. It's not getting tracked somehow.
Please help! I am using MT 4.1 and Visitor Stats 1.6.
Posted by Darryl | June 1, 2008 9:56 PM
Posted on June 1, 2008 21:56
I'm having a similar problem to Darryl's. I installed VS 1.6 and I'm not getting stats on all my blogs. Some give stats and others do not. The VS plugin has never worked properly and I have just inherited the support. I found that the Template Installer plugin was throwing errors and disabled it about a month ago. Since then I reinstalled with the newest Template Installer and then upgraded VS to 1.6. Now the Visitor Stats and Views show up in the Dashboard, but the stats are askew or absent altogether.
Posted by Rusty | June 24, 2008 6:22 PM
Posted on June 24, 2008 18:22