Getting traffic to your web site without analyzing it, is like being blindfolded in a crowd. You hear voices, but you don't know which direction they are coming from or who they are. Without analyzing your web site traffic, it's difficult to improve your web site marketing.
Getting traffic to your web site without analyzing it, is like being blindfolded in a crowd. You hear voices, but you don't know which direction they are coming from or who they are. Without analyzing your web site traffic, it's difficult to improve your web site marketing.
One of the best ways to get consistent traffic to your site
with by getting other webmasters to add your link to their
pages. This results in direct traffic from people clicking on
the links, and indirect traffic because modern search engines
use links to determine how to rank a site in the search engine
results page. The more "quality" links a site has, the higher
it appears in the listings (quality is defined as other higher
ranking sites).
Introduction
Configure Our Script
Getting Into the Code
Some of these will not make sense quite yet, because they are defined before the primary function of the program to ensure that they have been loaded before the primary function begins to execute. After reading the article, you may want to re-read it so those functions begin to be clearer and are seen in context.
Getting traffic to your web site without analyzing it, is like being blindfolded in a crowd. You hear voices, but you don't know which direction they are coming from or who they are. Without analyzing your web site traffic, it's difficult to improve your web site marketing.
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.
Introduction
Configure Our Script
Getting Into the Code
To start, let's make the script configurable so it can be somewhat customized for each page on which it is embedded. The actual tracking of how far the page has been scrolled involves a program cycle. This means that the program loops through, over and over, to check whether the scrolled position of the page has changed. So, let's allow for a configurable amount of time the program should wait after it finishes one cycle, before it jumps into the next. We will use milliseconds as the unit of measurement:
// Set to amount of milliseconds to wait between vertical-scroll-distance checks
var cycleLength = 100;