Here's what I want to do.
I'm working on a site that will attract homeowners from various other sites (real estate agents, loan officers, lawyers) and from various means (websites, blogs, emails).
I would like to be able to track the source of those visitors so that when they decide to fill out a form (negotiation request) - we know how they came to us and can reward the referral source. Not too unlike an adwords or affiliate situation.
I figured the easiest way to "source" them would be to send them to a page just for their referrals where I would set a cookie.
The cookie would have to last as we see visitors enter, bookmark, and comeback a month later.
I can write html, and know enough .js to get into trouble with. The site is primarily html.
I'd like to set the cookie using this: <META HTTP-EQUIV="Set-Cookie" CONTENT="refcode=mm99;expires=Wednesday, 08-Aug-10 23:59:59 GMT; path=/">
It's an easy thing to create a page and insert this tag and change the value.
This cookie has the name of "refcode" and a value set by me that might match the referral I set the page up for.
(Wayne Gretzky might be wg99)
My problem is finding a javascript that reads that cookie and inserts it into a html page.
I don't want to delete the cookie, I don't want to edit the cookie.
I also don't want the visitor to have to enter the referral source - I want it automatic.
I'd also like it to automatically insert the value into a form (hidden or visible is fine).
I've spent the last couple of days searching script collections on google - but can't seem to find what I need or make one of them work.
I found one called ID tracker - but it has the user enter their referral source.
Any help would be greatly appreciated.
For references - here's what I have right now.
Here's a sample referral start page: http://suburban-renewal.com/r/mm
That sets the cookie and refreshes to the index.
This is the test form I'm working on: http://www.suburban-renewal.com/negotiationrequest1.html
I have the script loaded here: http://www.suburban-renewal.com/scripts/refcodetracker.js
Am I barking up the wrong tree or can this be done and I'm just missing something.
Thanks!
Mike Mueller