document.referrer is a JavaScript method that returns the URI of the page that linked to the current page. If the user navigated directly to the page, for example through a bookmark, the value returned by document.referrer will be an empty string.
You can find more information about this on https://developer.mozilla.org/en-US/docs/Web/API/Document/referrer.
My question is:
When clicking on links within emails in a browser, we often land on pages where document.referrer is empty. This has been observed with various email providers when clicking on ads or URLs in newsletters.
Is it safe to assume that this behavior applies to all email providers, or are there exceptions?
I want to differentiate visitors who clicked on links from customer emails, but I'm not sure how to do this precisely.
In other words, if document.referrer is not empty, does that mean the visitor did not come from an email link (e.g., Yahoo, Google, etc.)?