![]() |
Web Development »
ASP.NET »
Utilities
Beginner
License: The Code Project Open License (CPOL)
Zeta LinksBy Uwe KeimA web application for generating and measuring shortcut hyperlinks, similar to bit.ly |
C#, .NET (.NET3.5), ASP.NET, ADO.NET, Dev
|
|
Advanced Search Add to IE Search |
|
|
|
||||||||||||||||
This articles introduces a web application that allows you to create shortcut hyperlinks to arbitrary URLs and monitor their usage (i.e. who clicks it). So to some degree, this application can be compared to the various URL shorteners out there, like TinyUrl.com or bit.ly.
In contrast to the URL shorteners, my goal was not to provide shorter URLs but solely to monitor the usage of the hyperlinks.
For example, I route every download of the executable of the setup of our CMS Zeta Producer through an URL of Zeta Links. Since the setup executable cannot be tracked by web analysers like Google Analytics, this is my only chance to actually track the usage of the download hyperlink (sure, I could analyse the server log files, but that was too low-level for our scenario).
If everything is set up correctly, you could use hyperlinks like e.g. http://www.my-cool-website.com/links/my-new-setup.
The "workflow" of the URL resolving goes like this:
The application consists of the following building blocks:
I'll quickly discuss these parts in the following chapters.
The main web application is an ASP.NET 3.5 C# project. You can deploy it to a Microsoft Windows 2003 Server or a newer server version.
You configure the application just as every other ASP.NET application, too, i.e., adjust the settings in the "web.config" file. In addition, you have to configure IIS to route every HTTP 404 request to an ASPX file of the application.
The download of the application contains a SQL script for Microsoft SQL Server 2005 or higher to create an empty database.
Once it has been created, you have to configure the connection string to the database in the "web.config" file of the ASP.NET web application.
The idea of the satellite web application was born when we first used Google AdWords to advertise products.
Since I wanted to measure who came from a click through our Google AdWords ad to the landing page, I set up a new entry in Zeta Links and entered that URL in Google AdWords. Unfortunately Google forces you to have the domain name of the URL that is being shown to the end-user of a Google AdWords ad to be the same as the actual hyperlink being redirected to.
Now I had a problem: Zeta Links was set up on domain A on server 1 whereas the destination URL for our ad was set up on domain B on server 2.
One possible solution was to simply copy the web application and the database and duplicate it on server 2. What I would have lost through this solution is the ability to have all information in one place.
So I developed a different solution:
Although this is no high-performance solution, it worked pretty well in our scenario.
So use the satellite web application if you require to have provide Zeta Links hyperlink resolving on different servers, even across data center boundaries. Ignore it otherwise.
The main web application consists of a simple, but for our scenarios just right, GUI. This chapter shows you some screenshots to give you an expression of the functions.
This form enables you to create a new or edit an existing hyperlink.
This page shows you the clicks on a given hyperlink within a configurable time span.
Important information include:
When looking at the application code, you probably will be shocked that you discover nothing groundbreaking.
The main web application uses the "App_Themes" ASP.NET to build its GUI, so if you want to change the look and feel of the administration area, simple modify the files in this folder.
I have published this article in the "Utilities" section to indicate that the article contains little exciting code and is more of a foundation for similar projects you plan to develop.
This article introduced a working "real-world" application to create, manage and evaluate shortcut hyperlinks.
As always, I would love to get your feedback, suggestions and enhancements. Feel free to drop me a note below in the discussions section of the article.
| You must Sign In to use this message board. | |||||||||||||||
|
|||||||||||||||
|
|||||||||||||||
|
|||||||||||||||
|
|||||||||||||||
General
News
Question
Answer
Joke
Rant
Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads.
|
PermaLink |
Privacy |
Terms of Use
Last Updated: 22 Nov 2009 Editor: Deeksha Shenoy |
Copyright 2009 by Uwe Keim Everything else Copyright © CodeProject, 1999-2010 Web20 | Advertise on the Code Project |