nat
06-11-2003, 03:50 AM
I searched 1,000's of javascripts and google and these forums. All I need is a javascript that creates a cookie that shows the 'Referring URL' (and only that 1 page even if the user browses to another page on my site that has the same javascript code on it) and a 'Personal Text Tracking Code' that I set in the Javascript on that particular page.
Javascript 1 - Create Cookie:
1. User goes to https://www.mydomain.com/index.html
A. Referring URL (if there is one) gets stored in a cookie
B. Tracking Code set in the javascript on that index.html page also gets stored in the cookie
Javascript 2 - Get Info From Cookie:
2. If User goes to https://www.mydomain.com/order/orderform.cgi (an html page is shown with javascript 2 in it)
A. Referring URL gets Printed out in the html of that page
B. Tracking Code in cookie gets Printed out in the html of that page
I can then by myself pass the info along to my Existing form processing perl script using html: <input type="hidden" name="referrer" value="[ <SCRIPT>document.wri.....javascript 2 code here.......</SCRIPT> ]">
User clicks Submit. I get the info.
Javascript 1 - Create Cookie:
1. User goes to https://www.mydomain.com/index.html
A. Referring URL (if there is one) gets stored in a cookie
B. Tracking Code set in the javascript on that index.html page also gets stored in the cookie
Javascript 2 - Get Info From Cookie:
2. If User goes to https://www.mydomain.com/order/orderform.cgi (an html page is shown with javascript 2 in it)
A. Referring URL gets Printed out in the html of that page
B. Tracking Code in cookie gets Printed out in the html of that page
I can then by myself pass the info along to my Existing form processing perl script using html: <input type="hidden" name="referrer" value="[ <SCRIPT>document.wri.....javascript 2 code here.......</SCRIPT> ]">
User clicks Submit. I get the info.