Hi, I've been coding up a huge site for the last few months - and I'm adding some extra touches. I was wondering how I can determine where the user is coming from (I think this can be done with PHP, but I'm not too sure, I think JavaScript would be more likely), eg - If they Google'd my site, it would show something like "Hello Googler". Or if they clicked on a link from the main page, which goes in to a deeper part of the site, they can have a link to return to the main part of the site. Does anyone know how to do this? Thanks, Responses appreciated.
You can try using the referrer property but it has many problems. <script type='text/javascript'>alert(document.referrer);</script> Code (markup): It returns nothing for local files and IE apparently. Plus, I think you have to click something on the last page, not use a bookmark or the address bar.