Collect HTTP_REFERER in the MailChimp form
-
Hi,
There is a number of fields you can collect in a MailChimp form, like
{response}, {subscriber_count},{language}, etc.I would like to be able to collect HTTP_REFERER, e.g. via {referer}.
If you are like me and cannot wait, here is a small hack that worked for me. In the file includes/functions/template.php, I changed the following two lines:
$needles = array( '{ip}', '{current_url}', '{date}', '{time}', '{language}'); $replacements = array( $_SERVER['REMOTE_ADDR'], mc4wp_get_current_url(), date( "m/d/Y" ), date( "H:i:s" ), $language );
with
$needles = array( '{ip}', '{current_url}', '{date}', '{time}', '{language}', '{referer}' ); $replacements = array( $_SERVER['REMOTE_ADDR'], mc4wp_get_current_url(), date( "m/d/Y" ), date( "H:i:s" ), $language, $_SERVER['HTTP_REFERER']);
Best
Vlad
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Collect HTTP_REFERER in the MailChimp form’ is closed to new replies.