• Scott

    (@kitgrow)


    Hello SplitIt Team,

    Currently the flex-fields and upstream messaging are loaded on all pages.

    ie.
    /v1/dist/upstream-messaging.js
    /v2.0/splitit.flex-fields.sdk.js

    Is it possible to add a restriction to only load on pages where it is used as opposed to being loaded site-wide? This would have a positive effect on site speed scores when not in use.

    Thank you for the recent updates as well!

    Cheers,
    Scott

Viewing 1 replies (of 1 total)
  • Thread Starter Scott

    (@kitgrow)

    By adding the following code to our child theme functions.php, the flex fields are only loaded when needed. Is there a handle that loads the upstream messaging as well? I can’t seem to find it.

    Added to functions.php

    ...
    // Splitit
      if (!is_shop() && !is_product() && !is_cart() && !is_checkout() && !is_wc_endpoint_url()) {
        wp_dequeue_script('flex_field_js');
        wp_dequeue_style('flex_field_css');
    }
    ...
Viewing 1 replies (of 1 total)
  • The topic ‘Upstream and FlexFields Firing on All Pages’ is closed to new replies.