I’ve had a lot of fun over the past couple of weeks working on a "spare time" project that has enormous "bang for the buck" development satisfaction. You know what I mean: you do a little work to produce something, and the benefits are valuable and instantaneous. The feeling of excitement and satisfaction I get every time I push something that I think is cool out the door is one of the reasons I so love this work.
The problem was posed to me one day by my wife Susan when we were talking about the problems associated with long URL’s in newsletter emails. If the URL ends up spanning a line in a plain text email, there’s a good chance your audience won’t bother to figure out how to reassemble it. Unfortunately, several of our domain names are somewhat long, and when you add query string parameters into the mix, the URL’s can cause problems.
I know what you are thinking: what about TinyUrl? It’s free, easy, and makes your URLs about as short as they can be. We seriously considered using TinyUrl for just those reasons. But we had a few ideas that we thought would make it worth writing our own version of TinyUrl:
- TinyUrl is somebody else’s domain. As long as they continue to exist and offer the service they do for free, there’s no problem. But what if they decide to charge for the redirection service some day in the future? What if they shut down their site? All our TinyUrl links would be broken, and if those links are embedded in emails we sent, there’s no way to fix them.
- There’s no click tracking. This issue isn’t much of a problem for most of our newsletters because we use AWeber, and it does click tracking for us. AWeber replaces your URL with their redirection URL (which isn’t so tiny), so there’s no point trying to use TinyUrl. You’d just end up causing a double-redirection when visitors click on your links. AWeber aside, wouldn’t it be nice to be able to send out short links with click tracking in any email (including plain text emails)? And wouldn’t you like to track the clicks that come in through an ad you placed on someone else’s site?
- Finally, as with any make or "buy" decision, there’s the issue of flexibility. I knew that the redirector would not be difficult to code in .NET (I wrote a multi-user version for an ISP several years ago in VB6/ASP). I knew we wanted additional features like click tracking. If history is a precedent, we’ll come up with something else we want it to do some time in the future. If I write it and we own the code, we can make it work however we want!
Today I installed Release 1 of the Logical Expressions Redirector. It is pretty basic at this point, but it does everything TinyUrl does and it also tracks clicks. I don’t have reporting done for the click tracking yet, but hey, we don’t have any clicks yet! At least I’ll be collecting the data.
The Release 1 features include:
- Secured administration login. I used ASP.NET forms authentication and a custom login form for this.
- Redirection List page: Shows what redirections have been set up, letting you sort by the URL alias (the last chunk of the URL that identifies which redirection to use), the target URL, or the friendly name of the redirection.
- Redirection Detail page: Lets you add/edit redirections, and gives you the full converted URL for pasting into messages. You can enable/disable click tracking on individual target URLs. You can also set up multiple aliases for one target URL, which lets you track clicks from different sources (just create one alias per source).
- Redirector page: Based on the alias passed on the query string, the redirector page redirects the browser to the target URL, optionally tracking the click.
- SQL Server database. All of the LE Redirector database objects live in their own SQL Server 2005 database. Being on SQL Server will be helpful when I add the click summarization process that will crunch all of the individual clicks into a daily summary that I can use for reporting.
- C#: For those who care, I wrote the software in C#.NET. To make the code work efficiently, I used the SqlClient data objects and added only enough "framework" code to achieve a classic three-tier architecture.
We’re going to run the software internally for a while and continue to make improvements as we think of them. When we get to the point where it is a nice, fully functional package, we’ll turn it into a commercial product. You can keep abreast of our progress in that regard right here at Nerdy Musings. If you’d like me to contact you when the commercial version is available, just send me your contact information using the feedback link near the bottom of this page.