Movable Type Hack: Visitor Stats Detailed View
Mark Carey of MT-Hacks has written a beautiful Visitor Stats plug-in for Movable Type 4, which shows the visitor statistics on the dashboard when you login.
The free version doesn't include detailed views, such as the statistics for each entry, or which search terms led to your blog. These features are reserved for a "Pro" version, which can be expected to be rather expensive for individual blogs or blogs with low traffic.
But, you can get around that with a little hack that I wrote. It queries the Visitor Stats database and compiles the visitor statistics, letting you see the top list of visited pages, the top list of referrers, and the top list of search terms and search words.
I don't want to ruin Mark Carey's business, however, so I have deliberately made no efforts trying to integrate this hack with Movable Type. Instead, the hack is a stand-alone web page that connects to your Movable Type database and extracts and displays the statistics.
Requirements
The free version doesn't include detailed views, such as the statistics for each entry, or which search terms led to your blog. These features are reserved for a "Pro" version, which can be expected to be rather expensive for individual blogs or blogs with low traffic.
But, you can get around that with a little hack that I wrote. It queries the Visitor Stats database and compiles the visitor statistics, letting you see the top list of visited pages, the top list of referrers, and the top list of search terms and search words.
I don't want to ruin Mark Carey's business, however, so I have deliberately made no efforts trying to integrate this hack with Movable Type. Instead, the hack is a stand-alone web page that connects to your Movable Type database and extracts and displays the statistics.
Requirements
- Movable Type 4.
- Visitor Stats from MT-Hacks.
- This code is deliberately made as a hack. The code is not prepared for users that want a nice interface. You should probably have some experience setting up an application on a web server to use this code.
- The search term extraction relies on an array of regular expressions. It does not detect all of the search engines around the world, and it may not extract the search terms correctly. You may want to experiment a bit with the code.
- Download viewstats.zip for Movable Type.
- Extract the contents of viewstats.zip in a directory on your web server that you've password-protected with , e.g., .htaccess.
- Edit the file config.php so that the database connection is configured for your Movable Type database, and so that the blog ID corresponds to your blog ID. You may also want to edit the "ignore words" list, which contains those words that are ignored in the top list of search words.
- View your statistics by visiting the directory you created on your web server, and visiting view.php.
If you liked this post, share it with others:
Categories
Movable Type0 TrackBacks
Listed below are links to blogs that reference this entry: Movable Type Hack: Visitor Stats Detailed View.
TrackBack URL for this entry: http://blog.blazingangles.net/MT/mt-tb.cgi/62






















Leave a comment