PDA

View Full Version : display referrer search-key on website



hilrap
01-18-2007, 11:48 AM
hey forum,

does anyone know here, how display the referring search key to my visitors?

e.g.

Visitor comes from google searching for "yellow bananas"

on my website it should now read:

Welcome blalbla - you're searching for "yellow bananas"?


Thanx alot in advance!
hilrap

Twey
01-18-2007, 12:03 PM
<script type="text/javascript">
document.write("You're searching for: " + decodeURIComponent(document.referrer.match(/q=([^&;]+)/)[1]).replace(/\+/g, " "));
</script>