• Resolved juliegiles

    (@juliegiles)


    We are working on our site performance and during testing it we noticed this plugin is sending an additional POST request to the home page for each load. It’s like the site is getting loaded twice per single view, and because it is a POST, it will always hit the actual server, not the cache. This request is taking ~1.5 – 2.5 seconds, and so it’s always either the 1st or 2nd most time consuming request. I think it’s doing this POST request to track how many views the form gets, and I could not find a way to disable it.

    Any ideas about this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author fatcatapps

    (@fatcatapps)

    Hi there,

    Sorry for the slow reply. I had to verify this to be sure, but there is a way to completely disable the tracking. I think it should help you out here, but let me know if not.

    https://fatcatapps.com/optincat/docs/advanced-features/disable-conversion-tracking/

    Regards,
    Jeremy Hoffman
    Support Engineer,
    Fatcat Apps

    Thread Starter juliegiles

    (@juliegiles)

    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() ) ) ?>, {

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Plug-in Slowing Site with Post Request’ is closed to new replies.