Detecting search words used to find a website.
Can anyone tell me how to detect the search words a visitor would have entered in a search engine to find my website? I can see these search words in my website statistics but I don't know how to detect them when a visitor connects to my site. I would like to have my site open the appropriate page of my site based on what was entered in the search engine.
Any help would be much appreciated.