Title: Exclude from JavaScript Combination Doesn&#8217;t Work
Last modified: November 13, 2020

---

# Exclude from JavaScript Combination Doesn’t Work

 *  Resolved [Sam-wa](https://wordpress.org/support/users/sam-wa/)
 * (@sam-wa)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/exclude-from-javascript-combination-doesnt-work/)
 * Our site loads the following file in the footer and we want to exclude it from
   JavaScript Combination.
 * [https://static.zdassets.com/ekr/snippet.js](https://static.zdassets.com/ekr/snippet.js)(
   Zendesk chat widget)
 * However, the file is not listed in the drop-down list in the Siteground optimizer
   plugin. So we can not exclude it.
 * Is there a fix for this?
 * Thanks!
    -  This topic was modified 5 years, 4 months ago by [Sam-wa](https://wordpress.org/support/users/sam-wa/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Stoyan Georgiev](https://wordpress.org/support/users/stoyangeorgiev/)
 * (@stoyangeorgiev)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/exclude-from-javascript-combination-doesnt-work/#post-13657378)
 * Hello there [@sam-wa](https://wordpress.org/support/users/sam-wa/),
 * You can exclude external script from being combined using the filter we’ve designed
   for that purpose. Here’s an example of the code, you can add to your functions.
   php file:
 *     ```
       add_filter( 'sgo_javascript_combine_excluded_external_paths', 'js_combine_exclude_external_script' );
       function js_combine_exclude_external_script( $exclude_list ) {
           $exclude_list[] = 'script-host.com';
   
           return $exclude_list;
       }
       ```
   
 * If you are having any difficulties, feel free to contact us again!
 * Kind regards,
    Stoyan
 *  Thread Starter [Sam-wa](https://wordpress.org/support/users/sam-wa/)
 * (@sam-wa)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/exclude-from-javascript-combination-doesnt-work/#post-13659858)
 * Awesome!
    This worked like a charm.
 * Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Exclude from JavaScript Combination Doesn’t Work’ is closed to new replies.

 * ![](https://ps.w.org/sg-cachepress/assets/icon-256x256.gif?rev=2971889)
 * [Speed Optimizer - The All-In-One Performance-Boosting Plugin](https://wordpress.org/plugins/sg-cachepress/)
 * [Support Threads](https://wordpress.org/support/plugin/sg-cachepress/)
 * [Active Topics](https://wordpress.org/support/plugin/sg-cachepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sg-cachepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sg-cachepress/reviews/)

## Tags

 * [javasctipt](https://wordpress.org/support/topic-tag/javasctipt/)

 * 2 replies
 * 2 participants
 * Last reply from: [Sam-wa](https://wordpress.org/support/users/sam-wa/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/exclude-from-javascript-combination-doesnt-work/#post-13659858)
 * Status: resolved