Edwin ThivyaRaj P
Edwin ThivyaRaj P

Reputation: 33

document.referrer not returning full url

I am trying to find the organic search keyword for my site using document.referrer. I am having trouble in using document.referrer. It is not returning the full URL.

For example: When I search on Google like "HTML DOM referrer Property" and click the first result (w3schools link).

In w3schools, I can see only the

"https://www.google.co.in/"

but not

"https://www.google.co.in/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=HTML+DOM+referrer+Property" or

"https://www.google.co.in/urlsa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0CBwQFjAAahUKEwiGxv3SyOTIAhUIHo4KHRCyB54&url=http%3A%2F%2Fwww.w3schools.com%2Fjsref%2Fprop_doc_referrer.asp&usg=AFQjCNFNiXvO_JozIUUi3Q7I2lHcJ18NhA&sig2=LEgMJ7G1206-FIMQFDmaig".

How can I get the full url to find the organic search and keyword? Or Please help me to achieve this in some other way.

Upvotes: 1

Views: 1723

Answers (1)

meskobalazs
meskobalazs

Reputation: 16051

Google (and also Yahoo) does not pass the parameters to the referrer string, but for example Bing does. If you need to optimize your keywords for Google, you need to use their tools.

Upvotes: 2

Related Questions