Hi,
Heres a simple way to do it without HttpHandlers or mapping extensions to the aspnet_isapi.dll.
1. Add a script manager to your page or master page (tut tut if don’t have one already, this is the AJAX revolution!) Make sure you set the EnablePageMethods property to true). Also make sure the script manager is inside your form tag.
2. Create a public static method in your code behind with [WebMethod] above it and add System.Web.Webservices to your usings. Add your handling code, you could update your database, increment a counter or write to a log file.
3. Add an image to your page which has an onload=”PageMethods.TheNameOfYourPageMethod” attribute.
here's a complete tutorial with code:
http://web2asp.net/2009/01/tracking-visitors-in-aspnet-by-using.html