Non-technical summary: Track incoming referrer and write it to any hidden form field with the identifier “referrer” (this can be created in Contact Form 7, for example; see below). Also if the WordPress site redirects from HTTP to HTTPS, this plugin also overrides the redirect to add the referrer to the https URL.
When integrating with Contact Form 7, add a hidden input field such as the following:
[hidden referrer id:referrer]
And then add to the Mail’s Message Body:
If you’re just integrating this with HTML, just add this to any form:
<input type="hidden" id="referrer" name="referrer" />