Exclude JS to be combined




Wordpress LScache Plugin: Exclude JS to be combined

Last Updated on: Wed, 15 Apr 2026 00:00:02
Hello, I need to exclude a JS snippet that is injected on every page of my website by a plugin. This piece of code is responsible to assign Facebook Pixel events. I have a lot of products on my website and each product generates its own JS file on wp-content/litespeed/js only because of that piece of code. So I think that if there is a way to not combine this Facebook Pixel code, I could have only one JS optimization file for all of my products. Is that right? Regards, Jos? This topic was modified 1 year, 3 months ago by Jos?. Hi, If you dont want that JS to be included in the JS Combined file, then enter that JS in the JS Excludes box under the [7] Tuning tab of the LiteSpeed Cache Page Optimization. Regards. Hello, The problem is that I dont know how to exclude that. If it was a separate file, I could just add its URL, but it is not. The JS snippet is directly placed in the HTML by the plugin. It is something like: ... Regards could you please share a full code that added by other plugin ? Hello, Of course! When I compare two generated JS files with almost the same size, the piece of code below differs. var pysOptions= staticEvents : facebook : PageView : delay :0, type : static , name : PageView , pixelIds :[ ], params : page_title : Bala Frutibelo Framboesa Peccin 600g , post_type : product , post_id :1615, plugin : PixelYourSite , user_role : guest , event_url : jadoces.com.br /p /bala-frutibelo-framboesa-peccin-600g / ids :[], hasTimeWindow :!1, timeWindow :0, eventID : , woo_order : , edd_order : , ViewContent : delay :0, type : static , name : ViewContent , pixelIds :[ ], params : content_ids :[ 1615 ], content_type : product , content_name : Bala Frutibelo Framboesa Peccin 600g , category_name : Balas, Balas mastig u00e1veis , value :6.8, currency : BRL , contents : id : 1615 , quantity :1 ], product_price :6.8, page_title : Bala Frutibelo Framboesa Peccin 600g , post_type : product , post_id :1615, plugin : PixelYourSite , user_role : guest , event_url : jadoces.com.br /p /bala-frutibelo-framboesa-peccin-600g / ids :[], hasTimeWindow :!1, timeWindow :0, eventID : , woo_order : , edd_order : dynamicEvents : signal_form : facebook : delay :0, type : dyn , name : Signal , pixelIds :[ ], params : event_action : Form , page_title : Bala Frutibelo Framboesa Peccin 600g , post_type : product , post_id :1615, plugin : PixelYourSite , user_role : guest , event_url : jadoces.com.br /p /bala-frutibelo-framboesa-peccin-600g / ids :[], hasTimeWindow :!1, timeWindow :0, eventID : , woo_order : , edd_order : signal_download : facebook : delay :0, type : dyn , name : Signal , extensions :[ , doc , exe , js , pdf , ppt , tgz , zip , xls ], pixelIds :[ ], params : event_action : Download , page_title : Bala Frutibelo Framboesa Peccin 600g , post_type : product , post_id :1615, plugin : PixelYourSite , user_role : guest , event_url : jadoces.com.br /p /bala-frutibelo-framboesa-peccin-600g / ids :[], hasTimeWindow :!1, timeWindow :0, eventID : , woo_order : , edd_order : signal_comment : facebook : delay :0, type : dyn , name : Signal , pixelIds :[ ], params : event_action : Comment , page_title : Bala Frutibelo Framboesa Peccin 600g , post_type : product , post_id :1615, plugin : PixelYourSite , user_role : guest , event_url : jadoces.com.br /p /bala-frutibelo-framboesa-peccin-600g / ids :[], hasTimeWindow :!1, timeWindow :0, eventID : , woo_order : , edd_order : triggerEvents :[], triggerEventTypes :[], facebook : pixelIds :[ ], advancedMatching :[], removeMetadata :!1, contentParams : post_type : product , post_id :1615, content_name : Bala Frutibelo Framboesa Peccin 600g , categories : Balas, Balas mastig u00e1veis , tags : commentEventEnabled :!0, wooVariableAsSimple :!1, downloadEnabled :!0, formEventEnabled :!0, ajaxForServerEvent :!0, serverApiEnabled :!1, wooCRSendFromServer :!1 debug : , siteUrl : https: / /jadoces.com.br , ajaxUrl : https: / /jadoces.com.br /wp-admin /admin-ajax.php , enable_remove_download_url_param : 1 , gdpr : ajax_enabled :!1, all_disabled_by_api :!1, facebook_disabled_by_api :!1, analytics_disabled_by_api :!1, google_ads_disabled_by_api :!1, pinterest_disabled_by_api :!1, bing_disabled_by_api :!1, facebook_prior_consent_enabled :!0, analytics_prior_consent_enabled :!0, google_ads_prior_consent_enabled :null, pinterest_prior_consent_enabled :!0, bing_prior_consent_enabled :!0, cookiebot_integration_enabled :!1, cookiebot_facebook_consent_category : marketing , cookiebot_analytics_consent_category : statistics , cookiebot_google_ads_consent_category :null, cookiebot_pinterest_consent_category : marketing , cookiebot_bing_consent_category : marketing , consent_magic_integration_enabled :!1, real_cookie_banner_integration_enabled :!1, cookie_notice_integration_enabled :!1, cookie_law_info_integration_enabled :!1 edd : enabled :!1 woo : enabled :!0, addToCartOnButtonEnabled :!1, addToCartOnButtonValueEnabled :!0, addToCartOnButtonValueOption : price , singleProductId :1615, removeFromCartSelector : form.woocommerce-cart-form .remove There are some unique elements on this snippet, just like page_title and post_id attributes, for example. Hi, in your above example , you can use keyword like facebook , see if it helps , and please do remember to purge all after you made change. Best regards, Hello, So, where should I use this keyword? Cant I use a more specific word, like pysOptions to avoid another errors? Regards, Jos? pysOptions is also usable , any string you extract from that inline code is okay , but try to narrow it down itself , as no other inline code will have same string Ok, and where should I use this keyword? page optimization -> tune setting -> JS exclude Did it and worked great! Thank you!



LiteCache Rush: Speed comes from using less, not from doing it faster



Reference