Hi, I gave the link to my developer and he wrote this:
I’ve read the instructions to define ‘FCA_EOI_DISABLE_STATS_TRACKING’, but that does not disable the POST requests, only makes their statistics logic ignore them, so in that sense the tracking is disabled, but the problem still persists.
I’ve prepared a patch for Mailchimp that prevents the POST requests as well:”
What do you think?
— ./includes/eoi-shortcode.php–BACKUP–2017-01-20–01 2017-01-20 18:09:13.156626000 -0800
+++ ./includes/eoi-shortcode.php 2017-01-22 18:02:01.387826999 -0800
@@ -70,7 +70,13 @@
* @return string
*/
private function add_prerequisites_for_form( $form_id ) {
– $head = get_post_meta( $form_id, ‘fca_eoi_head’, true );
+ $head_data = get_post_meta( $form_id, ‘fca_eoi_head_data’, true);
+ $head = ($head_data &&
+ isset($head_data[‘track’]) &&
+ $head_data[‘track’] == !defined ( ‘FCA_EOI_DISABLE_STATS_TRACKING’ ))
+ ? (isset($head_data[‘head’]) ? $head_data[‘head’] : null)
+ : null;
+
if ( !empty ( $head ) ) {
return $head;
} else {
@@ -127,8 +133,10 @@
$this->prerequisites[ $form_id ] = $head;
– delete_post_meta( $form_id, ‘fca_eoi_head’ );
– add_post_meta( $form_id, ‘fca_eoi_head’, $head );
+ update_post_meta( $form_id,
+ ‘fca_eoi_head_data’,
+ array(‘track’ => !defined ( ‘FCA_EOI_DISABLE_STATS_TRACKING’ ),
+ ‘head’ => $head) );
return $head;
— ./includes/eoi-activity.php–BACKUP–2017-01-20–01 2017-01-20 18:01:56.280626000 -0800
+++ ./includes/eoi-activity.php 2017-01-22 17:58:03.231826999 -0800
@@ -76,6 +76,8 @@
}
public function get_tracking_code( $form_id, $escape = true ) {
+ if ( defined ( ‘FCA_EOI_DISABLE_STATS_TRACKING’ ) ) return null;
+
ob_start();
?>
jQuery.post( <?php echo json_encode( trailingslashit( get_home_url() ) ) ?>, {