Forum Moderators: DixonJones

Message Too Old, No Replies

User tracking with cookies

rolling your own system?

         

millyre

10:02 am on May 11, 2006 (gmt 0)

10+ Year Member



Hi all,

Do anyone have recommendations for setting up a tagging based system for my site? I've used the various free log analysis packages, but would like to 'upgrade' to a cookie based system in order to better track usage across visits

I've read briefly about some of the commercial offers, but I was thinking that I could as well roll my own system, it can't be all that difficult/complex...or?

I've got partial control of an apache server, and php at my disposal.

I was thinking of simply having each page call another one with javascript, adding an unique ID (stored in a cookie) plus URL, and storing the information in the server log file. (I could use mysql, but I think using the log file would make the system simpler)

(I haven't given much thought to the analysis of the data once collected. Perhaps this is where the commercial packages shows their strength?)

So then, is it possible, to have a user tracking system in 3 lines of code? :-)

Hissingsid

10:06 am on May 19, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi,

I'm not currently interested in a complete tracking system so here is what I'm currently working on.

I have some standard cookie functions in an external .js file. On each page is some JS that reads a named cookie if it doesn't exist then it writes the referer to the cookie. This is, for me, the most important information, where did my traffic come from. I also increment a page views cookie because I'm interested in how many pages they go to before they go into my "shopping system". All of the pages up to this point are just HTML with a few of lines of JS.The shopping cart is a Perl CGI script and I will collect the referring page used before entering the script. Then when the user converts I am sent the contents of the referer cookie, the contents of the page views cookie and the page they were on before entering the reponse script.

I know that this will not tell me what all of my failed visits do but I will get a good handle on where my successful traffic is comming from. For me this is what I need to know.

Sid