Thursday, February 18, 2010

Tracking Visitors to Your Site

Tracking Visitors to Your Site

"Well, I'm willing to try it out," Claude said. "It sounds easy enough to do."

"It is," I said, "but it brings up an important topictracking where your visitors are coming from. If you're spending money to get traffic, you want to know if you're wasting your money or not!"

Tracking Visitors with Referrer Headers

When you click a link, the browser contacts the Web server specified in the link and requests the appropriate page. The browser sends extra information along with the request. One of those pieces of information is known as the referrer header, which tells the Web server how the browser was referred to the page.

Suppose, for example, that a visitor to the page www.ericgiguere.com/index.html clicks that page's link to www.memwg.com/index.html. As part of the the page-fetch request, the Web server hosting www.memwg.com gets a referrer header that looks like this:

Referer: http://www.ericgiguere.com/index.html 

(The word "referer" is misspelled deliberately, for historical reasons.) Now, the browser is not required to send the Referer header when it requests a page. Some users disable the header for privacy reasons, but most browsers send them quite routinely.

Tracking referrers is a great way to find out more about how visitors arrive at your site. You can tell when someone finds your site with Google, for example, because the referrer header starts with "http://www.google.com." Usually, you can even tell what keywords they used to find you. Consider the following referrer header as an example:

Referer: http://www.google.com/search?num=100&q=voip+long+distance 

This header tells you that the visitor found your page with the search terms voip long distance (spaces are represented by plus signs). This kind of information can help you fine-tune your pages and can even suggest new keywords and topics for your site.

Ask your Web hosting service how to track referrer informationit varies from system to system.

Tracking Visitors with Landing Pages

Referrer headers aren't the only way to track visitors. Advertising campaigns can also use special-purpose landing pages for tracking clicks. You create a separate landing page for each of your advertisements. The landing pages have no content; all they do is redirect the browser to another page on the site. Each time someone clicks one of your ads, the visitor gets sent to the appropriate landing page before being redirected to the actual destination page.

For the visitor, it's just as if the browser went directly to the destination page, but you've actually gathered a valuable piece of information: exactly which ad brought the visitor to your site. By examining your Web server's access logsfiles that record browser page requestsyou can quickly determine which ads are working well and which aren't.

An alternative to creating landing pages is to embed a unique identifier into the Web address (the URL) used in the ad link. Just add a question mark to the end of the URL and a name-value pair like "from=ad1." (This is called a query parameter.) In other words, instead of using this URL:

http://www.voip-at-home.com/index.html

use the following URL for one ad:

http://www.voip-at-home.com/index.html?from=ad1

and this URL for a second ad:

http://www.voip-at-home.com/index.html?from=ad2

You can easily pick these out from the Web server's access logs.

The great thing about landing pages and query parameters is that they work even if referrer headers are disabled.

No comments:

Post a Comment