Thursday, September 24, 2009

Adding a WunderCounter Link to Your iPhone's Home Screen

Since a number of you are checking your stats with your iPhones, I thought I'd share this handy tip with you. To get a link to the WunderCounter directly from your home screen (with your other applications), do the following:

  1. Open Safari on your iPhone
  2. Go to http://www.wundercounter.com
  3. Click the "Login" link at the top right of the screen
  4. Wait for the login page to load
  5. Now, click the "+" icon at the bottom of your screen
  6. Select "Add to Home Screen"
This will add a new icon to your iPhone which looks a little bit like the home page of the WunderCounter. You can arrange it just as you would any other icon. Clicking it will take you directly to the WunderCounter login page in your Safari browser. It's a handy little thing that can save you a bit of time here and there. You can, of course, do this with pretty much any web page you'd like to bookmark in Safari. I use it myself and I find it to be quite helpful.

Friday, September 18, 2009

HTML::Restrict - Easily Strip HTML From Your Documents

I've just released HTML::Restrict to the world. It's a Perl module which allows you to strip HTML from text very easily. Here's an example:



#!/usr/bin/perl

use strict;
use warnings;

use HTML::Restrict;

my $hr = HTML::Restrict->new();
# use default rules to start with (strip away all HTML)
my $processed = $hr->process('i am bold');

# $processed now equals: i am bold

If you want to allow some HTML but not all, you can add a set of rules to allow arbitrary elements and attributes:



#!/usr/bin/perl

use strict;
use warnings;

use HTML::Restrict;

my $hr = HTML::Restrict->new();
$hr->set_rules({
b => [],
img => [qw( src alt )]
});

my $html = q[hello me];
my $processed = $hr->process( $html );

# $processed now equals: hello me


This has now been released as Open Source software and is available on the CPAN

Tuesday, September 1, 2009

How I Spent My Summer Vacation

Things have been a little quiet on the blog front lately, but that doesn't mean there hasn't been plenty of work behind the scenes. Just thought I'd fill you in on some things I think are interesting.

More Twitter Integration

I've been working on further integrating the WunderCounter with Twitter. Early, you may recall, I added daily stats summaries via Twitter DM (Direct Message). That got me thinking that the immediacy of Twitter lends itself really well to the Tripwire feature. So, I've just about finished setting this up. I'm tentatively calling it Twitwire. The concept is that you can flag IPs which you are interested in and, on a per-IP basis, you can decide which are important enough that you'd like to get a DM when this IP visits your pages. You could find out within seconds who is visiting your pages without even having logged in to check your stats. I think that's pretty cool and I'm looking forward to unleashing it you in the next few weeks. It just needs a bit more testing and then it will be on its way.

Cleaner Looking Reports

I've been integrating the Bluetrip CSS framework with the login area of the WunderCounter. It will make the reports look cleaner and more consistent. Plus, it's just a really handy tool to have in your toolkit. I recently used it on this calendaring system which I put together for the United Nations Association of the United States It makes it very fast to get started with a clean layout which is (I think) very easy on the eyes.


A Little Bit of jQuery

Any JavaScript work I'm doing now is generally based on jQuery. I was using prototype and script.aculo.us a while ago, but jQuery is my favourite JavaScript tool right now. It makes working with JS pleasant (never thought I'd hear myself say that) and it makes simple tasks easy. There's a huge community behind it and almost more plugins than you could wish for. If you haven't had a chance to look at it, I highly recommend it.


New Hardware

I've got a couple of new dedicated servers almost configured and almost ready to go. I'll get those pulling some weight as soon as I can slot the time, but they're also available to be used right away if any other hardware melts down. It's always nice to have a couple of spares.

Getting to Know GitHub

Over the summer, I've taken on some new open source projects and posted them to GitHub.com along with some other work which I've had online for a while. My public GitHub projects can be found at https://github.com/oalders The new projects are:

WWW::Mechanize::Cached This is a Perl module which caches web lookups. It allows you to make your own bots, site scrapers etc which can cache pages, which dramatically speeds things up when you have to re-run your scraper or when you're testing etc. It's a module which I took over from Andy Lester, who was kind enough to give me access to it after I approached him about cleaning up some of the open bug tickets.

Net::FreshBooks::API This is a Perl module which is really just a layer over the XML interface to the FreshBooks API. It means you can do cool stuff with their API without having to mess around with XML. Increasingly, I'm finding that this is a very good thing. I've never been a huge fan of XML. It's often very clunky and, in many cases, total overkill for basic API functionality, but that's likely a topic for a different post entirely. Edmund von der Burg was kind enough to make me a co-maintainer of this module so that I could add functionality for recurring billing. This is for some client work I've been doing. More on that when the site is officially online.

Off the top of my head, that's the important coding-related stuff. Watch for some of these improvements to come online over the month of September. I've already got plans for some new functionality after that, so hopefully there will be lots going on to keep you interested.

Monday, July 6, 2009

Premium Accounts Now Track Up to 500 Pages

If you've been managing your Premium account to stay within the 250 page limit, you can take it easy now. The limit for Premium accounts has been raised from 250 to 500 as of this evening, which should be more than enough for the great majority of sites being tracked. No charge for the upgrade!

I've also got some more servers on order. Those are supposed to arrive later this week and I'll be using them to beef up both the web counters and the member area of the site. I'll also throw a new database server into the web hosting side of things, just to keep things fair. :)

Get Your Daily Stats via Twitter

So, I had some free time today and I figured I'd play around with Net::Twitter, which is a handy little Perl module for use with the Twitter API. I have to say that it's so incredibly easy to use that the Twitter integration was a lot of fun. Rather than test it myself and wait around, I've added the feature to the repository today and it's now available on the live site. It's always fun when stuff works out so well that you can go from an idea to production on the very same day!

The summary tweet is a count of your hits + unique hits from the previous day. It's sent to you via direct message, so it's private and does not appear in your timeline.

Here's what you do to activate this new feature:
  • Follow me on Twitter (so that I have permission to send you direct messages)
  • Log in to the WunderCounter
  • Choose Twitter from the Options menu
  • Enter your Twitter username and set Send Daily Tweet menu to yes
  • Click the send test now link.
  • If there is no error and you get a test message from me in your account, you're all set. If you have problems getting going, please get in touch with me via the usual methods
That's it! You'll get the message sometime after midnight CST. Probably within the hour, after all of your daily data has been aggregated. The amount info is obviously limited because of Twitter's format, but I think it could be a handy way of tracking your stats, especially if you're on the go and/or haven't had a moment to log in and check your stats on a given day.

So, let me know what you think. If there's some interest, there are other places Twitter could be used in the application. For instance, getting a Tweet when a certain IP address hits your site might be a worthwhile addition. Another use may be to create a custom schedule of tweets throughout the day when you'd like to be updated on your stats. For example, you could get your summary info sent at 9:00 AM, 5:00 PM and 10:00 PM. Those are just some ideas I've been playing around with, but I'm always open to suggestions, so keep them coming in.

Saturday, July 4, 2009

Bug Fixes: Search and Layout

I've just fixed a couple of noteworthy bugs. First off, in some cases, when a user tried to produce custom report results for specific pages, no results would be returned even when there clearly should have been results. This would have affected all searches which can be constrained by "page". For example, if you had searched on traffic by city and decided to view results only from page "x", you may have (incorrectly) gotten no results. There was a problem with the SQL searching on the wrong column for page names, which has now been fixed.

Secondly, those of you who use Internet Explorer would have seen search results in black text displayed on a black background for some reports, such as the hits by city. This is caused by MSIE not recognizing "fff" as shorthand for "ffffff" (which is how "white" is defined in the source of the report). This has now also been fixed. Thanks, Perry, for pointing out both of these issues.

If you come across bugs (or what you think might be bugs), please let me know when you see them. These can be problems with actual data or even just display issues. I develop in Firefox and don't always have the chance to check things out in Internet Explorer, so occasionally display issues can appear which I'm unaware of. Taking the time to let me know allows me to fix it for you as well as any other users who may be seeing the same thing. The faster you report it, the faster I can fix it!

Thursday, July 2, 2009

Support Emails Back Online

If you sent an email to support@wundercounter.com over the last little while, it probably bounced back to you with an error message. The contact form at wundercounter.com was working as was the telephone support, but direct emails to the support address were bouncing. The issue was that my oldest web server (a Sun/Cobalt RAQ XTR) died recently and that machine happened to be hosting the help desk. This was the server which originally ran the WunderCounter when I first got into the web hosting business. It lasted for 9 long years and finally, after some fans began to malfunction, it went to its final resting place. Actually, I'm amazed that something with non-stop moving parts lasted the better part of a decade. I'm also amazed that I've been doing this for this long -- it was just supposed to be a hobby to get my mind off my studies while I was in University.

Now, this machine hasn't hosted the WunderCounter itself for a very long time, but it was running some useful software and it wasn't broken, so it didn't need to be fixed. However, now that it truly is broken, I'm in between help desk systems. I hope to have that fixed in a reasonable amount of time. I'm looking at a couple of ticketing systems, Redmine being my favourite right now. It's a really great project management system and it handles ticketing as well. If you're looking for something to help you keep track of projects, clients and bug reports, you may want to have a look at Redmine. It also integrates with many different version control systems, which is perhaps what I like best about it.

Having said all that, if you need support, there are the traditional methods of telephone and the contact form at WunderCounter.com, but the email is working again. I'll add a ticketing system back to the list shortly, but in the meantime don't hesitate to get in touch if you have any questions, input etc.