I would like to customize the MailChimp script, but cannot find it in all the files. Could you give me the location, file name, class name?
Hey tomherold,
The mailchimp element can be found in wp-content > themes > enfold > config-templatebuilder > avia-shortcodes > mailchimp > mailchimp.php.
As for the class name, you can use a web inspector to inspect element and check the class names.
Best regards,
Nikko
Thank you Nikko!
Hi tomherold,
Glad that we could help :)
Let us know if you need further assistance.
Best regards,
Nikko
Hello Nikko,
Well, it probably goes beyond a support question. I added an extra field with the referrer information. Using the php function $_SERVER[‘HTTP_REFERER’]. But it does not work – giving me my own domain name. Probably because of a page change.
Hi tomherold,
What do you expect to get adding this code?
Best regards,
Victoria
Add this to the function.php file:
// Set Cookie for Referrer
function register_bar_ref_cookie() {
if(!isset($_COOKIE['origin_ref'])) {
setcookie('origin_ref', $_SERVER['HTTP_REFERER']);
}
}
add_action('init', 'register_bar_ref_cookie');
and then this code into mailchimp.php in the subfolder avia-shortcodes:
// Get Referrer
if (isset($_COOKIE['origin_ref'])) {
$referer = $_COOKIE['origin_ref'];
} else {
$referer = $_SERVER['HTTP_REFERER'];
}
$data_to_send = array(
'email_address' => $mail,
'status' => $status,
'interests' => array('xxx-your-code' => true),
‘merge_fields’ => array(‘REFER’ => $referer),
);
This will give you the original referrer in your MailChimp list (add field REFER in MailChimp).
Hi,
Thank u very much for sharing this out.
Best regards,
Basilis