I've been pulling my hair out trying to work out how to capture the user's referrer URL when people sign up using an online form on a landing page on my clients website.
I've created a hidden field when creating a subscribe form in Campaign Monitor to receive this information, the code is below:
<input id="fieldmhkti" name="cm-f-mhkti" type="hidden" />
Your help is greatly appreciated.
It may be possible to add the following code to your input tag to set that up:
value="<?php echo $_SERVER['HTTP_REFERER'] ?>"
However this does rely on a number of different factors and it’s difficult to know whether this will work okay in this situation. Feel free to contact support with some further details of what you want to do and we can help out :)
Thank you for your prompt response. I put that in my code, ran a test, and instead of displaying the referrer URL, it just displayed the code you posted. Any other ideas?