I am trying to figure out how to handle better tracking of my site visitors and have decided to do the following: in each link that I publish (either in emails or banner ads), I will add a ?[parameter] to the URL link so that I can track the source of the visit.
Now, where I need some help is what kind of scripting can I use in my index.htm file to handle parsing and recording this information into a flat file on the server. I want this flat file to be appeneded to every time someone comes to the website (so the script will append write to the file). Any suggestions or, better yet, sample source code that I can use for this???
Just to be clear, my idea is something like this:
link out on net:
As soon as someone comes to my site with this link, the script would retrieve the source parameter, add a date/time stamp, and add that (optinmsg1, 05/23/2002 11:00 am[cr]) to a flat file on the server called "visitors.txt"
From my research thus far, it seems to me that the final solution is a combination of scripting (in the index.htm file to initially collect the parameter and to also call the CGI program with these parameters) that would then call a CGI script to actually append the info to the flat file. Any and all suggestions would be greatly appreciated...
Oh, and now to reveal what a complete rookie I am... My ISP has provided me with a /cgi-bin directory under my home directory - I am assuming this is where I would place my eventual CGI file... the questions is this: are Perl CGI files just regular text files with a .cgi extension or are they compiled somewhere?
Now, where I need some help is what kind of scripting can I use in my index.htm file to handle parsing and recording this information into a flat file on the server. I want this flat file to be appeneded to every time someone comes to the website (so the script will append write to the file). Any suggestions or, better yet, sample source code that I can use for this???
Just to be clear, my idea is something like this:
link out on net:
As soon as someone comes to my site with this link, the script would retrieve the source parameter, add a date/time stamp, and add that (optinmsg1, 05/23/2002 11:00 am[cr]) to a flat file on the server called "visitors.txt"
From my research thus far, it seems to me that the final solution is a combination of scripting (in the index.htm file to initially collect the parameter and to also call the CGI program with these parameters) that would then call a CGI script to actually append the info to the flat file. Any and all suggestions would be greatly appreciated...
Oh, and now to reveal what a complete rookie I am... My ISP has provided me with a /cgi-bin directory under my home directory - I am assuming this is where I would place my eventual CGI file... the questions is this: are Perl CGI files just regular text files with a .cgi extension or are they compiled somewhere?