Forum Moderators: DixonJones

Message Too Old, No Replies

Visitor Tracking with PHP, MySQL, Cookies

Any Recommendations or Advice?

         

Mardi_Gras

9:37 pm on Aug 19, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have set up a test site to evaluate solutions for visitor tracking using PHP, MySQL, and cookies (we're new to the first two in my office).

My basic needs are pretty simple:

1) I want to log unique visitors into a database
2) I want to log referrer info for each visitor
3) I want to track which visitors see a certain page (A "Thank You" that pops up after ordering)
4) After tracking those items, I want to be able to run reports to see which referrers convert the most traffic into sales.
5) I would like to be able to easily view this information by definable periods (today, yesterday, last week, etc.)

Is anyone using such a system to track visitors? If so, any recommendations for scripts or software? Any advice?

Thanks.

jatar_k

9:46 pm on Aug 19, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I have toyed with this and have various versions floating around

1)I assume this means IP, new unique if they don't have a cookie?
2)I logged this in two parts the full string and the domain only for easier grouping
3)I had certain pages tagged so it would have a field for that pageview
4)This is something that was always difficult to figure out the best way but I will look over some notes and get back to you
5)I timestamped each entry with a date in one column and a time in another

An explanation of what you are putting in the cookie would be helpful.

Mardi_Gras

2:40 am on Aug 20, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



jatar_k:

1) No cookie=new visitor - Yes
2) domain only and full string - That sounds like a good idea
3) multiple pages tagged - That would be on the wish list
4) Reconciliation - This is the most crucial part - if you could find your info that would be helpful
5) Date and time fields - Again, sounds like what we would want to do

As for the information we will store in the cookie, I think just enough to correlate the visitor with the database entry. Any suggestions? Any reason to store more info in the cookie?

Mardi_Gras

6:17 pm on Aug 20, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



C'mon - with all the expertise here, surely I can get more input...

jatar_k

11:43 pm on Aug 20, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



it looks like you have all of the info in there. The cookie could just be the id from their row in the table that would make it easy to pull out the info quickly and update the row as they navigate the site.

When they make a purchase you just add a flag to a field that represents a sale.

You will have, in each row, all pertinant information on every visitor. IP, referrering domain, full referrer string, flagged pages (yes or no), purchase (yes or no), date and time. Looks fairly comprehensive, then just find a lovely way to interpret the data. With the info sorted into fields and partially interpretted already it should make viewing and sorting it fairly straight forward.