Tracking Referral Source By Cookie

liunx

Guest
Here's what I want to do.<br /><br />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).<br /><br />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.<br /><br />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.<br />The cookie would have to last as we see visitors enter, bookmark, and comeback a month later.<br /><br />I can write html, and know enough .js to get into trouble with. The site is primarily html.<br /><br />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=/"><br />It's an easy thing to create a page and insert this tag and change the value.<br />This cookie has the name of "refcode" and a value set by me that might match the referral I set the page up for. <br />(Wayne Gretzky might be wg99)<br /><br />My problem is finding a javascript that reads that cookie and inserts it into a html page.<br />I don't want to delete the cookie, I don't want to edit the cookie.<br />I also don't want the visitor to have to enter the referral source - I want it automatic.<br />I'd also like it to automatically insert the value into a form (hidden or visible is fine).<br /><br />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.<br />I found one called ID tracker - but it has the user enter their referral source.<br /><br />Any help would be greatly appreciated.<br /><br />For references - here's what I have right now.<br />Here's a sample <b>referral start page</b>: <a href="http://suburban-renewal.com/r/mm" target="_blank"><a href="http://suburban-renewal.com/r/mm" target="_blank">http://suburban-renewal.com/r/mm</a></a><br />That sets the cookie and refreshes to the index.<br />This is the <b>test form</b> I'm working on: <a href="http://www.suburban-renewal.com/negotiationrequest1.html" target="_blank"><a href="http://www.suburban-renewal.com/negotiationrequest1.html" target="_blank">http://www.suburban-renewal.com/negotiationrequest1.html</a></a><br /><br />I have the script loaded here: <a href="http://www.suburban-renewal.com/scripts/refcodetracker.js" target="_blank">http://www.suburban-renewal.com/scripts/refcodetracker.js</a><br /><br /><br /><br />Am I barking up the wrong tree or can this be done and I'm just missing something.<br /><br />Thanks!<br /><br />Mike Mueller<br /><br /><br /><br /><br /><br /><!--content-->
Welcome to the forums Mike <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><br /><br />Don't mess with cookies myself but have you tried hotscripts.com? Instead of javascript maybe php would be a better method.<!--content-->
<!--quoteo(post=218843:date=Jan 12 2008, 08:12 PM:name=TCH-Bruce)--><div class='quotetop'>QUOTE (TCH-Bruce @ Jan 12 2008, 08:12 PM) <a href="http://www.totalchoicehosting.com/forums/index.php?act=findpost&pid=218843"><img src='http://www.totalchoicehosting.com/forums/style_images/1/post_snapback.gif' alt='*' border='0' /></a></div><div class='quotemain'><!--quotec-->Welcome to the forums Mike <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><!--QuoteEnd--></div><!--QuoteEEnd--><br /><br />Thanks for the welcome Bruce!<br />Hotscripts, eh?<br />I'll see what I can find out.<br /><br />About all I know about php is that it's what makes my blogs run.<br />learning something new is always good.<br /><br />MM<!--content-->
Welcome to the forum, Mike. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><!--content-->
Last night I checked out Hotscripts.com.<br />I didn't find what I was looking for but did find a "solution in a box" called Post Affiliate Pro.<br />I'm not sure if it will work - it may be much more than what I was looking for.<br />The cost is $99.<br /><br />Anyone have any experience with this?<br /><br /><br /> - and thanks Thomas!<!--content-->
 
Top