Forum Moderators: DixonJones

Message Too Old, No Replies

How does one get the referrer emailed as a variable on form submission

How can one get emailed the referrer url when the visitor fills out a form?

         

vik_c

2:25 pm on Dec 2, 2002 (gmt 0)

10+ Year Member



When someone visits my site and makes a purchase, I like to know where exactly he is coming from, I can usually figure this out but it involves sifting through the logs.

Is there any way I can grab the referrer url and email it across as a hidden variable in the order form the customer fills out?

Would you know of any script that can handle this or any tweaking in the usual formail script. Has anyone tried this?

Thanks!

chris_f

2:30 pm on Dec 2, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If the form isn't the first page on your site then it will have to be stored in a session variable or passed through every page. It's often easier to just ask as it covers it even if there is no referrer.

Chris

vik_c

2:45 pm on Dec 2, 2002 (gmt 0)

10+ Year Member



I see. Asking a question like 'Where did you hear about us' adds one more form field to be filled out and decreases the chances of the sale being completed, even if marginally.
I'd rather not take that chance.

Like I said, I do get all this information, the process is just time consuming at this point. My site is on a Linux box, can't use ASP. I was hoping for a CGI script that could take care of this, never seen one though.

Thanks for your input.

gsx

3:32 pm on Dec 2, 2002 (gmt 0)

10+ Year Member



I log referrer (if not my own address) by IP address on each page. Then, when a form is completed, I look in that file and check their IP address again and return that referrer if it exists. If it does not exist (No referrer or possible AOL user), the form asks the user for that extra field.

Receptional

1:34 pm on Dec 3, 2002 (gmt 0)



We do exactly what you want by transferring the referral data to a cookie at the point at which they first enter the site then we collect in at the form.

Works a treat.

Dixon.