So I put this basic code on my website, and alert with document.referrer:
alert(document.referrer);
And when I do a search the link is:
https://www.google.com/webhp?sourceid=chrome-instant&rlz=1C1ASUM_enUS494US494&ion=1&ie=UTF-8#hl=en&sugexp=les%3B&gs_rn=1&gs_ri=serp&tok=1r7LlSJjT_AkzPDie7y_qw&pq=document.referrer%20test&cp=6&gs_id=n&xhr=t&q=websiteurlblahblahblah&pf=p&safe=off&tbo=d&rlz=1C1ASUM_enUS494US494&sclient=psy-ab&oq=jacked&gs_l=&pbx=1&bav=on.2,or.r_gc.r_pw.r_qf.&fp=b120f3e780b613e5&bpcl=40096503&biw=1680&bih=925&ion=1
But when I click on my website the alert that pops up is:
https://www.google.com
I am trying to make a script that reacts based on different search terms that people use to enter my website, but this is stopping me dead in my tracks.