Welcome to WebmasterWorld Guest from

Forum Moderators: DixonJones & mademetop

Message Too Old, No Replies

Can Cookies Track Users?

Client wants cookies for stats, possible?



2:16 pm on Mar 12, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

A client I have wants to track users, where they go, what they do etc.

He says he looks through the web logs but seems to have the idea that cookies are the best way of tracking users. I have always thought that cookies were pretty limited in the info they could bring and were more for the visitor than the webmaster.

So want i need to know is what do i need to track users? should i wait until set up a PHP database and track users through a login process or are there other ways like using cookies etc?


4:59 pm on Mar 13, 2001 (gmt 0)

You don't have to require users to sign in. Put a cookie on their browser that is a user id. Store the id in a table. You will have to have some kind of logging for each page delivered by the site. A simple table with userid and pageid and maybe time should do it. Then a 3rd table to map pageid's to page URLs.

Now you have the required data. You can then write all kinds of cool reports on it.

Bill Fisher


5:41 pm on Mar 13, 2001 (gmt 0)

WebmasterWorld Senior Member littleman is a WebmasterWorld Top Contributor of All Time 10+ Year Member

If you are simply tracking users through your website per visit why not just use an IP and user agent combination? I know the convention for most applications is cookie tracking, but it really wouldn't be that hard to track via the above and you would be able to get the info on people who have there cookies turned off.

Just some grammar stuff

Edited by: littleman


5:51 pm on Mar 13, 2001 (gmt 0)

The IP address/user agent idea will work if you are only interested in information regarding a single visit. Every time someone connects to the internet, they get a different IP address (mostly). You will not be able to track return users by this method.

As for cookies being turned off... we have seen a VERY low percentage of users of our sites that turn off cookies. We still track these users BTW using a session variable or by passing the userid in the URL.



6:09 pm on Mar 13, 2001 (gmt 0)

WebmasterWorld Senior Member littleman is a WebmasterWorld Top Contributor of All Time 10+ Year Member

W4an, yeah we are on the same page. I'm just kind of surprised by how little non-cookie based tracking is used in the main stream.

I could see a per visit tracking script being very useful for a site that is not tied into a database.


10:25 pm on Mar 13, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

ok erm thanks guys, Im really new to this whole dynamic tracking users thing im going to put in a PHP database soon is the cookie tracking thing a PHP script that stores the users in a database? Im assuming you can do this sort of stuff with either cgi/php/asp??

Basically im doing the site in two stages with the first stage creating the static pages. Then 2nd stage will be the implemtation of a database (MySQL) with PHP. If im going to use cookies is it a fairly straightforward process (to create a tracking system) which i can start now or is it something better done later on?


9:30 pm on Mar 24, 2001 (gmt 0)

10+ Year Member

I recently added cookie tracking to one of my sites and it was relatively easy to add on top of the system I allready have, but of course this depends on the system you are building, I guess you will have a head start because you are allready thinking about it :-)
A couple of advantages to cookie tracking,

* you can clearly see the progress of a particular visitor through the site whereas otherwise if a few people are browsing simultaneously it is not so clear.

* Proxies, a number of people use proxies and occasionally they may come from one address to see a page, but the next page they come from a different proxy. Cookies help you confirm its really the same person.

* Repeat visits, you can get the warm glow from seeing someone come back to your site a few days/weeks later.


2:17 pm on Apr 16, 2001 (gmt 0)

WebmasterWorld Administrator brett_tabke is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

At the risk of promo's, anyone got anything "off the shelf" designed for cookie tracking? (other than those 8-10k packages)...


12:08 pm on Apr 17, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Yes, page-worm. Nasty little thing, invented by the US government to track emails and websites. You place the worm on your site, a user goes to your site and when he leaves the worm will follow him. It will tell you exactly where they will go, any passwords or usernames he/she uses etc. At the moment it is illegal for you to have it.

Featured Threads

Hot Threads This Week

Hot Threads This Month