I want to redirect users that arrive at my root url to another page that contains the referring site in the url, so that I can track which sources provide the most sales.
So if a user arrives at mysite.com from google, they will be redirected (using php header function) to mysite.com/page.php?ref=google.com. That way, I can see in my referral stats which search-engines are providing the most converting customers.
I already know how to do this, but my question is this: What would google and other search engines think of this? Would my search rankings suffer as a result of using a redirect? If so, how else can I achieve my aim?
Any help appreciated as always.
UPDATE: I’m tracking affilate sales. So the referral stats come from the sites I advertsise.
CONCLUSION: three helpful answers. Shame I can only accept one. Thanks guys.
Search engines SHOULD interpret the status codes sent along with the redirect like this:
302 = Temporary means the URL initially recorded is okay and should be listed in search results, just use the content of the target site for index
301 = Permanent means the URL is actually wrong, use the target URL for search results
So it depends on which URL you want to show up in search results. I assume you want the default 302 in this particular case. If not, use