How can I determine if the document.referrer is from my own site?
Each time a page is requested I get the referrer of the page it came from. I need to track just referrer from other sites, I don't want to track going from one page to another within my site. How can I do that? document.referrer.indexOf(location.protocol + "//" + location.host) === 0; Originally posted at JavaScript - Am I the Referrer? When someone comes to our website for the first time, we store the referrer in a cookie. This way, if they download our demo, we can get the original referrer from the cookie and we learn what sites are effective in driving leads to us. Of course, every