ShortStat Beta 3
Update
An upgrade to v0.34b is now available.
ShortStat is a modest, home rolled referrer and site activity monitor. Beta 3? What happened to 2? Well, the “first” version that you may be familiar with was actually the second build but the first public version.
New in this version:
- Search engine keyword tracking. Currently supports all international versions of Google, AllTheWeb, Yahoo, MSN & AOL. More can be added upon request.
- Optional IP-to-Country mapping using the IP-to-Country Database provided by WebHosting.Info
- Support for hosting ShortStat on a different subdomain (see shortstat.shauninman.com/free/ for an example of a worn in installation)
- Quoted associative arrays to avoid conflicts on some set-ups
- Better care with variable naming, those that aren’t prefixed with
SI_
will be phased out at a later date in favor of a web-based configuration
An installer and an update from v0.2b are included in the package. As before ShortStat is provided strictly on an as is basis. You are soley responsible and liable for any damage you do to your website or server.
Download ShortStat v0.3b.
While making this update I had an opportunity to get nice and friendly with my ShortStat database of 55k+ hits and I’m beginning to realize that the original ideal of a single table stats package just isn’t practical. With only 55k hits my ShortStat table was 10.2MB. I think the next version will require a normalized, multi-table database if it’s going to be scalable.
050 Comments
Sweeeeeeet.
I easily updated to 0.3. I love this little thing, man. Hope you keep working on it! :)
Thanks!
Quick suggestion:
What about making the site name a variable in confiruation.php so that I could easily make my title tag say something other than “ShaunInman.com’s ShortStat”. Just something that would identify the stats as belongs to my site, rather than yours. :)
Keep up the great work!
Good call Jeff. That will definitely make it into the next version—probably through that web-based config that I mention above. I also plan to add some more style hooks so you guys can start Zenning it if you want.
Upgrade wasnice ‘n easy - thanks! Now I can see that people have come to my site looking for “nice icon”!
I wouldn’t want to change the styles though - it looks just right. The overflow:auto divs make everything neat too.
I also love the default style, but I sure wouldn’t mind the hooks to play with it a bit, either. :)
Jeff
hey shaun - any possibility of building in an IP & host blocker to prevent spamming and recording of personal/known IPs?
It’s possible Andrew but I don’t think it’s within the scope of ShortStat. I’ve yet to receive any comment spam (fingers are crossed) that would motivate me to develop something like that but you never know.
Fantastico! Please program the next beta to make me coffee. cream. 2 sugars.
I love it, in a totally inappriate and unnatural way. Just what I need, at a glance, none of the junk I’m not interested in. And it looks purdy, and I don’t have to worry about reinvigorate being down and making my site time out.
+1 shaunotron
oh, and now i know that people get to my site by searching for “how to make yourself look pretty”
Whoa…. the update took me less than 10 mins.
Thank you Shaun for adding in my requests. I’m getting more addicted in watching the stat… ;)
ShortStat is a must for every site, it lets me know my site and visitors more….
One more comment. About the contries’ visits, the visits show me the statistics of ‘Hits’, is there any way to show ‘Uniques’ of each contries as well?
That would be easy to add—while I’m at it I could do the same for just about all the sections that refer to hits (like resources, referrers, etc).
This is a beauty! Installed two days ago, updated just now. My work colleagues are wondering what I’m staring at all day. Thank you and keep up the good work!!
Serendipity! Not but 1 week ago I was thinking about creating something like this and now I can spend the time on something else. This is really very cool.
I have some ideas about making further scalability/customization easier (for example, when adding an additional column to track), but I like how this app isn’t trying to be anything that it isn’t. The beauty is in the simplicity and the restraint it takes to keep with scope within reason but still producing exciting results.
Awesome, thank you for making this available.
[ php and formatting below may be stripped out after i post this ]
To filter out your own IP or crapflooders from recording their domain in your refer logs, modify this text to inc.stats.php :: …
No guarantees that it’s foolproof, but so far as I can tell it seems to work for me.
Cool Andrew, I’ll add a take on that to the next version!
A useful stat for me is the amount & types of http headers that people are receiving, i.e. 404/401/200 etc. It helps me track down coding problems, incorrect links, & security issues. It’d take up little real estate on the page, too. Thanks for the hard work, shaun!
I just got it hooked up, so now I’m hooked up…nice work once again, Mr. Inman.
I’ve noticed that not many people using this tool actually have browser stats percentages that total 100%. Also, I went through and cleaned out the referrals I personally had made & now my browser stats are waaaay below 100%. I’m guessing the math in there is somehow tied to the primary id or hardcoded somehow?
Also, it appears that the ip/crapflooders thing I provided above works only partially. It seems that it’ll strip the entry but will still log the url. So what you end up with is a blank line in the referer section, with an anchor tag to the site with no text. Strange.
I haven’t had time to look into either of those issues … perhaps later tonight. Just something I’ve noticed after playing w/ this really cool tool for a while now.
I really like ShortStat! It displays some essential information with a fast glance. Great for daily viewing.. Thanks, Shaun. Btw. like your music too. :) demands more songs
I’m trying to get Shortstats working on a Mac OS X 10.3. Unfortunately, I keep getting an error when trying to connect to MySQL. I know I’ve got the username/pw/hostname right since I connect to MySQL with phpMyAdmin all the time.
Are there any ‘generic’ problems in getting this to work with OS X?
Thanks.
bw
I’ve never tried getting ShortStat working on OS X so I don’t know of any ‘generic’ problems that might affect it. Sorry Bill.
Shaun- ShortStat is great (and runs fine on my OSX box). The si_shortstat table fills up fast (15 megs in month!) but that’s no problem. It’s handy as heck to have realtime stats generated so quickly. Thanks for the hard work on this!
Hi, I was looking for a good stats script so I stumbled upon this gadget, very cool! however, it lacked a nice ‘button’ . So I made a standard button: http://switch.spielerij.net/images/butt … tstats.jpg It’s nog the regular 80x15 but 94x15, because the name ‘shortstat’ is too long to fit on the 80x15 version.
Maybe someone else could try to make such a button, the font is ‘Silkscreen’. Feel free to use mine, but please host it yourself :)
Shaun, I can run the _install.php script successfully and view the test page, but when I insert the php line on my page I get the $horribly error message. Any idea why? I have confirmed that the database information in my config file is correct. Thanks.
Hello, Can somebody offer idiot proof, step-by-step instructions for getting the IP-to-Country listing to show?
Shaun - great piece of programming here. I installed after the constant referencing on hicksdesign and I love it so much better than the stat program I was using before. No more ugly images on my home page to record stats. Good job!
Is there any way to see it in action without downloading it and installing it?
Sure Tomas, just go to shortstat.shauninman.com. Sorry, you’ll have to copy paste, I don’t want search engines crawling it. The daily breakdown is a new feature that I’ll be releasing shortly.
This is great. I’ve been using Dean Allen’s refer for a while now, but ShortStat is much more comprehensive.
It also seems to spawn a large number of database queries. My homebrew blog uses the same database, without any cache, so after successfully installing and testing it, ShortStat turned my entire blog into a pile of error messages warning of “Too Many Datbase Connections.”
Perhaps, I’ll try again when it’s out of Beta.
I don’t think that’s ShortStat causing the error. Shortstat uses a persistent database connection and only makes a single query per page view. Viewing the stats page requires between 10-15 queries (it is presenting a good deal of information) but they’re all made using the same persistent database connection.
You’re right. It’s not the number of connections, but the persistence. Neither my blog engine nor Refer use persistent connections. My shared hosting provider might not grant me much more than one connection at a time. Oh well.
Hey John, try opening up functions.php and changing line 17 from: if (@mysql_pconnect(…) { to: if (@mysql_connect(…) {
and see if that doesn’t eliminate the problem.
Bill: Does your database user have the CREATE privilege on the db you want to use. To get more info about what is causing the error change:
die($horribly)
todie($horribly . mysql_error())
I also had problems when including shortstat files within class member functions, seems using global to bring the config variables into scope doesn’t work when you do this.Martagnan: I had a prolem with getting the ip-to-country plug-in working too. Turns out the problem was that my server wasn’t fast enough to load all the ip ranges before php’s default 30 sec timeout kicked in. To get arround this add
set_time_limit( 180 );
right beforeSI_pconnect();
in _ip-to-country.php.Shaun: Great work. I’m hooked!
Thanks for fielding those questions Greg.
There was a lot of talk a week ago about “beta this” and “beta that” and what it all means. In the case of ShortStat “beta” means “never intended for public consumption” (which might explain the humorous but laughable error reporting). Glad there’s people like Greg to pick up my slack. ;D
Urm, I just installed and put the include on various pages, but it keeps returning a “Could not access the database, please make sure that the appropriate values have been added to the configuration file included in this package” error. I know for a fact that my password and username, etc. are all correct. Know anyhting that might be causing the problem? I’m on TextDrive, just like Jon.
I love Shortstat, it is an addictive little utility that is simple and easy to comprehend. The major issue I have is the webcrawler spam I get on my site. It would be fantastic if in an external text/php file I could be able to add domains into a blocklist for Shortstat to ignore. It would be even cooler if there was a way to block an address directly from the shortstat window itself. Again fantastic job and great UI!
hey, cool stat system, already incredibly useful for a quick glance at whats going on on my site
just wondered if anyone can explain how to get ip-country panel to work? i think this has been raised already but i can’t see any info on this.
hold that thought. i missed Greg’s post that includes what i was looking for.
my bad and evil mistake >:-)
Has anyone else had this simply fail at step 6, as I have?
“Step 6. …You should see /shortstat/_trackme.php in the Resources table as well as your Platform and Browser information. “
All that returns is a Shortstat page with no stats! I’ve installed three times and tested fom Firefox, Safari, and IE, but there is no browser info…nada. I have to be missing something very simple. I’ve altered the config file, the tables are created just fine, and I know that my database connection works.
My site is hosted on a Windows box (sorry…I’m slowly migrating from ColdFusion to PHP) - are there any Apache specific things in the code? I do have Dean Allen’s ‘Refer’ working just fine, but I would really love to add this as well. Thanks for any ideas.
Sure enough, after posting I was able to google what I needed. Apparently, IIS doesn’t have the
$_SERVER['DOCUMENT_ROOT']
variable. Once I stuck the following lines in front of the Shortstat include, everything seemed to work just fine (watch line wrap):Sorry to hog the blog answering my own question, but maybe ths will help out some other odd duck trying to run this on IIS! It’s awesome, Shaun.
Thought I would add my 2c…
I have done step 1 and 2 correctly, however, when I do step 3 I receive the error message: “Could not access the database, please make sure that the appropriate values have been added to the configuration file included in this package.”
I unfortunately do not know enough of PHP or MySQL to know where the problem lies.
Any help?
DR
Sorry, the label of the database name was incorrect.
All working fine now.
DR
Another satisfied customer here! I’m having some troubles with my hosting provider’s use of owners and Apache, but nevertheless it’s great!
Man, it’s really cute. It’s what I was needing. Noo more awstats and relying on apache logs…. Wow, it’s so simple and useful. Thanks for this. It’ll make my life simpler and probably make me a stats freak….
Is it incrementalist? Or it resets on the next month and the previous goes to history?
Another note on using shortstat with a PHP/IIS setup. Apparently, IIS does not support the
$_SERVER['REQUEST_URI']
variable. This leads your resource list to be populated with only one blank entry. The workaround for this is to change the line ininc.stats.php
for the resource variable from:to:
I’ve installed on an OS X box. Works great, nice job. Only one question. My unique hits has stayed at one since I installed. I also use a visitor tracker so I know it’s at least three. (New install of both). Any ideas.
What do you mean by step 5 Where would I put that code if I am using wordpress? in my index?
also, how do I get my layout to look as nice as your layout? How do I change it around?