Skip to content Skip to sidebar Skip to footer

Get The Referral Url In Javascript

I want to see how much traffic I get from various URL shortening services like bit.ly tinyurl.com But because they use 301 redirection, they don't show up in my analytics. How can

Solution 1:

document.referrer

Example:

if (document.referrer && document.referrer != "")
      document.write('Thanks for visiting this site from ' + document.referrer);

Post a Comment for "Get The Referral Url In Javascript"