Introduction
Configure Our Script
Getting Into the Code
Let's face it, webmasters love to know how many hits their sites get. We pour over the logs and stats, counting each hit.
Sometimes we even put counters on our sites to show the world how many people have visited since oh, say, 1998. We know that no
one really cares but us, but that doesn't matter.
Well, by now I would imagine most of us know how to track hits and visits to our pages. But let's say you have one page that
is particularly long. We can see that someone has made a request to the server for it, but we never get to find out how far down
that page they actually scrolled.
Upon reading this article, and deploying the accompanying code, you will be able to resolve this issue should it ever arise.
I actually got the idea from a site where people who need programs, and people who write programs, come together and exchange code
for cash. One prospective buyer had just this problem and was looking for someone to help him out. The concept interested me
because I didn't think it would be possible. So I sat down and wrote it out (using some good references for Javascript and DOM).
I then put in my bid, which the buyer did not select, so you get it for free here at CWM!
One thing that is required in the reading of this article is an understanding of server side programming and the ability to write
your own program on the server for this script to send data to. The nice thing about it is that you can use ANY server side
scripting solution. Also understand what this script is reporting. In it's current configuration, it is the current position of
the top left corner of the browser window, as measured by how many pixels are between the top of the document and the current
position of the top left corner of the browser window.
Download the JavaScript Scroll
Monitor
Jim Auldridge is an active member of the Christian-web-masters.com forums. You
can find him regularly helping people with their programming questions.