Home

About

Website usability
-->Articles

Website design
-->Articles

Website testing
-->Articles

Search engine optimization
-->Articles

Website analytics
-->Articles

Web analytics archive

KPI Overview

Web analytics articles by UZilla.org

Collecting KPIs using tracking cookies (27th July 2007)


Having previously discussed the main Key Process Indicators for a website, this article presents a method of collecting the data needed to calculate visitor KPIs: namely the tracking cookie.

What is a tracking cookie?

A tracking cookie is a permanent cookie that is given to the user by a particular website. The idea behind this cookie is that it will leave a trail, that can be reconstructed, of the users browsing behavior. Tracking cookies have recently been associated with Spy ware but they are harmless in terms of damaging the users PC. For the website provider tracking cookies are a great way to get data about website KPIs.

How is the tracking cookie used for KPIs?

First a tracking cookie needs to be placed on the visitors desktop, this is done by using a cookie creation command (jsp), the actual coding for setting cookies can be found on many web resources about creating cookies. A unique cookie is only created, if one does not already exist. That is all the cookie handling that needs to be done, the rest of the information can then be taken form the web server log files.

Web server log files

Every request is logged on the web server in a web server log, information on the web server log includes:-

  • Time of request
  • Referrer (url that the request came from)
  • Client IP
  • Type of request (GET, PUT etc.)
  • File requested (i.e. www.uzilla.com/index.hm)
  • Status code of the response (i.e. 200, 404, 500…)

    The standard web server log can also be extended to include capture of the Client side cookies, this is the tracking cookie.

    Using the tracking cookie for visitor KPIs

    We can now examine, and this can be done via several popular web log analysis tools, the following:-

    Returning visitors

    Arguably we could use the Client IP to track visitors but there are issues with this, for example the visitor may be coming to the site via a proxy and the proxy IP will be shown. For most web surfers, that go via an ISP, the IP (in the web server log) will vary as they cerate sessions. When we have a tracking cookie, however, we can associate every request with a unique visitor. In practice we would keep the log information on a database so that we know every visitors requests to our website. This information would tell us if the visitor was a returning visitor (i.e. on the initial request they had one of are cookies) or a new visitor, i.e. one that did not have a cookie on the first request.

    Visitors browsing behavior

    With the tracking cookie we can reconstruct, via the web server log files, the exact path each visitor took thru our website, including where they exited the site. The time they spent on each page could also be known as well as the following:-

  • How many new visitors make some purchase (or click a paid ad)
  • How many returning visitors make some purchase (or click a paid ad)
  • If the user comes via a given search term are they more likely to make a purchase.

    Conclusion

    A great tool for calculating KPI’s for individual visitors is the tracking cookie, in combination with a web server log analysis tool. This extra information gives us more visitor specific information that does the Client IP that is also in the web server log files. There are issues with using tracking cookies however, one is that the end user may have cookies disabled, in this case the visitor should still be allowed to browse the site but not be tracked. Another issue is that the end user may delete the tracking cookie from their desktop, in which case assumptions about new and returning users are invalid. To some extent useful information can be gleaned via session cookies that are just tracking session behavior. For session tracking a temporary cookie is all that is needed but the returning visitor type of information can only be collected via a permanent cookie placed on the users PC.

    A better solution, and one that will be examined in future articles, would be to have a user log on with a unique use ID to use your website, to make the visitor go thru this extra step however requires offering the user something worth this extra effort.

    ©UZilla.org 2007

    No guarantee (or claim) is made regarding the accuracy of this information. Any questions or comments should be sent to:-