Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1051031

    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?

    • This topic was modified 5 years, 11 months ago by tomherold.
    #1051719

    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

    #1051737

    Thank you Nikko!

    #1051783

    Hi tomherold,

    Glad that we could help :)
    Let us know if you need further assistance.

    Best regards,
    Nikko

    #1051803

    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.

    #1053051

    Hi tomherold,

    What do you expect to get adding this code?

    Best regards,
    Victoria

    #1053087

    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).

    • This reply was modified 5 years, 11 months ago by tomherold.
    #1053438

    Hi,

    Thank u very much for sharing this out.

    Best regards,
    Basilis

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.