Get the User Referrer via JavaScript

Hi,

You van get the user referrer via javascript using the following code:

document.referrer

The said code will give you the full url path to which your user came from.

Example is http://google.com/?some-strings=goes-here

So you can check if its from a user from a google with a particular search string.

 

Just a Note. It can also received the same domain to which your site is in. For an instance your domain is http://domain.com then you referesh the page, the said code will return http://domain.com because you just refresh the page.

5 thoughts on “Get the User Referrer via JavaScript

  1. Pingback: dosage of gabapentin

  2. Pingback: useful source

  3. Pingback: You Can Find It Here

  4. Pingback: Skulpturen

  5. Pingback: area codes of Nevada

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.