Tracking website visitors like Amazon.com

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
mr_griff
Forum Commoner
Posts: 64
Joined: Tue Sep 17, 2002 11:11 am
Location: Bozeman, Montana

Tracking website visitors like Amazon.com

Post by mr_griff »

Has anyone coded or thought about coding a customer/visitor tracking system similar to what Amazon does? If you buy stuff from amazon.com I am sure that you have noticed that they start to make a recommended list of books, etc for you. For example I have bought books on php for myself and a couple cook books for my wife. Now on my recommended page it suggests other books that are cooking and php related that other people have purchased who buy books on php and cooking.

I have started coding something similar to try and track customers that come from our datafeed sources such as epinions, bizrate, etc. If a customer comes from their website and order right away it is easy to track, but I'm guessing most customers don't shop that way. I would say that it is more likely that they find your site with these shopping search engines initially and come back to make a purchase later. These are the types of people we want to know about. You could also play around with some other ideas with this kind of tracking, like after a visitor has check out a certain product xx number of times, offer them a discount or a package deal to try and encourage the purchase.

Thoughts, comments, suggestions???
Coco
Forum Contributor
Posts: 339
Joined: Sat Sep 07, 2002 5:28 am
Location: Leeds, UK
Contact:

Post by Coco »

well im only a newbie myself, but surely cookies would help?

maybe store origional referal url with a user id on a db and take the user id from cookie?
User avatar
nielsene
DevNet Resident
Posts: 1834
Joined: Fri Aug 16, 2002 8:57 am
Location: Watertown, MA

Post by nielsene »

You will need to use a database to store the information. Your key into the database can be any of
-- client IP address: simple, no cookie required, breaks for dialups/dynamic IP and Public terminals
-- persistent cookies: users may turn off, doesn't track the same user browser from multiple sites
-- user login system: more complex, wouldn't track casual visitors without an account.

A complete solution would likely be a combination of the second two. A few options:
-- after login the site stores a persistent cookies so that the user doesn't have to log in again from that computer (ie the "remember me/autologin")
-- if no login, use the persistent cookie as before, perhaps create a way to "upgrade"/"merge" this data into a regular user account if the user either creates an account or logs into an existing account
Post Reply