document.referrer to capture referrer information. When visiting a web page, the referrer or referring page will be the URL of the previous web page from which a link was clicked.
However, this is dependent on the referrer policy of the origin site or the default referrer policy on the user’s browser (see Chrome’s default referrer policy). This means that the site where the user is clicking the link may or may not send referrer information.
To capture where a user is coming from, we encourage using a mix of UTM parameters and referrer values in a defined Marketing Channel property.