Title: Loading external script
Last modified: December 2, 2019

---

# Loading external script

 *  Resolved Anonymous User 14869400
 * (@anonymized-14869400)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/loading-external-script/)
 * I have a Zoho chat box on a website, it is a external JS script.
    This is inserted
   into the Themes header code additions box, like on many themes.
 * Everything Autoptimize wise is working perfectly, but it seems to just remove
   this script all together..
 * I’ve no idea how I can put it back into the site without just removing the entire
   plugin?
 * Any help would be greatly appreciated.
 * Thanks

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

 *  Thread Starter Anonymous User 14869400
 * (@anonymized-14869400)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/loading-external-script/#post-12197437)
 * Little update, its actually the ‘Async JavaScript’ plugin.
    So maybe I went a
   little overboard there.
 * If using this additional plugin, is it possible to exclude this script?
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/loading-external-script/#post-12197455)
 * yeah; you can also exclude “stuff” in Async JS, so maybe try doing so for the
   Zoho script?
 *  Thread Starter Anonymous User 14869400
 * (@anonymized-14869400)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/loading-external-script/#post-12197474)
 * It did not work, as its the actual script code..
    How would I add this code?
 *     ```
       <script type="text/javascript">
       var $zoho=$zoho || {};$zoho.salesiq = $zoho.salesiq || {widgetcode:"f07dd8c94912283a3f411d2b73849e0931526de78ba67c5f506379f9c1d76c912bc03952879d51041bb09298f4c74dc1", values:{},ready:function(){}};var d=document;s=d.createElement("script");s.type="text/javascript";s.id="zsiqscript";s.defer=true;s.src="https://salesiq.zoho.com/widget";t=d.getElementsByTagName("script")[0];t.parentNode.insertBefore(s,t);d.write("<div id='zsiqwidget'></div>");
       </script>
       ```
   
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/loading-external-script/#post-12197489)
 * hmm, AsyncJS will not touch that, but AO might if you have “also aggregate inline
   JS” on? in that case you can exclude it by adding `zoho.salesiq` to the comma-
   seperated JS optimization exclusion list.
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/loading-external-script/#post-12219527)
 * Given the lack of further feedback I’m assuming this is fixed so closing the 
   topic. Don’t hesitate to follow up though if you still have questions/ remarks
   concerning this!
 * frank

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

The topic ‘Loading external script’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

## Tags

 * [external](https://wordpress.org/support/topic-tag/external/)
 * [js](https://wordpress.org/support/topic-tag/js/)
 * [script](https://wordpress.org/support/topic-tag/script/)

 * 5 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [6 years, 6 months ago](https://wordpress.org/support/topic/loading-external-script/#post-12219527)
 * Status: resolved