A Primer on Website Stats
Business websites benefit from getting information about their visitors: where they came from, which pages they visited, how long they were on your site, etc. Extrapolating on this information can help you find ways to improve your website and its ability to positively impact your bottom line. For instance, if you see that all of your visitors are from upper Manhattan, maybe you need less advertising there and more in Brooklyn.
How Web Stats (Typically) Work
Numerous companies provide free tools to track your web statistics — the largest of which is Google®. Their tool, Google Site Analytics, works similarly to most others you'll run in to. Here's the rundown:
- Companies have you set up an account (this way they can funnel the information into the right place). They then provide you with a piece of JavaScript that has elements unique to your account.
- You place this unique JavaScript (hereafter referred to as "the script") in your website's pages'
<head>
section. We've got information on how to do this in the next section. - Whenever somebody visits your website, the script sends their information to the Web stats company.
- The Web stats company aggregates the visitors' data for you and presents it to you.
Putting Web Stats on Your Web Pages
Once you have the script that's unique to your account, you need to put it on every Web page you need to track. This isn't too hard, we promise.
- Using your account's file editor, open one of your site's HTML pages.
- Locate the closing head tag, i.e.
</head>
. - Directly in front of
</head>
, paste the script the Web stats company provided you. - Save your changes.
- Repeat these steps for each page on your website until you've added the script to each one.
After putting the script on each page, most companies have a way of testing it to make sure you've done it correctly. Verify it's working and you'll start gathering data about who comes to your site.